mirror of
https://github.com/developit/microbundle.git
synced 2026-01-18 13:56:35 +00:00
Merge #287
287: 0.9.0 r=marvinhagemeister a=ForsakenHarmony Co-authored-by: Leah <me@hrmny.sh> Co-authored-by: Marvin Hagemeister <marvin@marvinhagemeister.de> Co-authored-by: Leah <me@hrmny.pw>
This commit is contained in:
commit
04685f78bd
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "microbundle",
|
||||
"version": "0.8.4",
|
||||
"version": "0.9.0",
|
||||
"description": "Zero-configuration bundler for tiny JS libs, powered by Rollup.",
|
||||
"main": "dist/microbundle.js",
|
||||
"source": "src/index.js",
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -47,15 +47,20 @@ const parseScript = (() => {
|
||||
|
||||
describe('fixtures', () => {
|
||||
fs.readdirSync(FIXTURES_DIR).forEach(fixtureDir => {
|
||||
const fixturePath = resolve(FIXTURES_DIR, fixtureDir);
|
||||
let fixturePath = resolve(FIXTURES_DIR, fixtureDir);
|
||||
|
||||
if (!fs.statSync(fixturePath).isDirectory()) {
|
||||
return;
|
||||
}
|
||||
|
||||
it(fixtureDir, async () => {
|
||||
if (fixtureDir.endsWith('-with-cwd')) {
|
||||
fixturePath = resolve(fixturePath, fixtureDir.replace('-with-cwd', ''));
|
||||
}
|
||||
|
||||
const dist = resolve(`${fixturePath}/dist`);
|
||||
// clean up
|
||||
await rimraf(resolve(`${fixturePath}/dist`));
|
||||
await rimraf(dist);
|
||||
await rimraf(resolve(`${fixturePath}/.rts2_cache_cjs`));
|
||||
await rimraf(resolve(`${fixturePath}/.rts2_cache_es`));
|
||||
await rimraf(resolve(`${fixturePath}/.rts2_cache_umd`));
|
||||
@ -90,6 +95,12 @@ describe('fixtures', () => {
|
||||
strip(output),
|
||||
].join('\n\n'),
|
||||
).toMatchSnapshot();
|
||||
|
||||
fs.readdirSync(resolve(dist)).forEach(file => {
|
||||
expect(
|
||||
fs.readFileSync(resolve(dist, file)).toString('utf8'),
|
||||
).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user