Skip to content

Commit

Permalink
Merge pull request sveltejs#1757 from sveltejs/sveltejsgh-1750
Browse files Browse the repository at this point in the history
Add agadoo, remove *-bundle.js test files
  • Loading branch information
Rich-Harris authored Sep 26, 2018
2 parents e0fe313 + 353d3b5 commit b5140cd
Show file tree
Hide file tree
Showing 99 changed files with 1,109 additions and 11,670 deletions.
2,156 changes: 1,092 additions & 1,064 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"README.md"
],
"scripts": {
"test": "mocha --opts mocha.opts",
"test": "mocha --opts mocha.opts && agadoo shared.js",
"quicktest": "mocha --opts mocha.opts",
"precoverage": "export COVERAGE=true && nyc mocha --opts mocha.coverage.opts",
"coverage": "nyc report --reporter=text-lcov > coverage.lcov",
Expand Down Expand Up @@ -52,6 +52,7 @@
"@types/node": "^10.5.5",
"acorn": "^5.4.1",
"acorn-dynamic-import": "^3.0.0",
"agadoo": "^1.0.1",
"chalk": "^2.4.0",
"codecov": "^3.0.0",
"console-group": "^0.3.2",
Expand Down
37 changes: 0 additions & 37 deletions test/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,43 +37,6 @@ describe("js", () => {
const output = `${dir}/_actual.js`;

fs.writeFileSync(output, actual);

return rollup({
input: output,
plugins: [
{
resolveId(importee, importer) {
if (!importer) return importee;
if (importee === "svelte/shared.js")
return path.resolve("shared.js");
return null;
}
}
]
}).then(bundle => {
return bundle.generate({ format: "es" });
}).then(({ code }) => {
fs.writeFileSync(`${dir}/_actual-bundle.js`, code);

const expected = fs.readFileSync(`${dir}/expected.js`, "utf-8");
const expectedBundle = fs.readFileSync(
`${dir}/expected-bundle.js`,
"utf-8"
);

assert.equal(
actual.trim().replace(/^[ \t]+$/gm, ""),
expected.trim().replace(/^[ \t]+$/gm, "")
);

assert.equal(
code.trim().replace(/^[ \t]+$/gm, ""),
expectedBundle.trim().replace(/^[ \t]+$/gm, "")
);
}).catch(err => {
if (err.start) console.error(err.start);
throw err;
});
});
});
});
212 changes: 0 additions & 212 deletions test/js/samples/action/expected-bundle.js

This file was deleted.

Loading

0 comments on commit b5140cd

Please sign in to comment.