remove redundant try-catch

pull/674/head
Rich Harris 8 years ago
parent 7ad4befd25
commit 6751a83264

@ -90,12 +90,8 @@ describe("ssr", () => {
const cwd = path.resolve("test/runtime/samples", dir); const cwd = path.resolve("test/runtime/samples", dir);
glob.sync('**/*.html', { cwd: `test/runtime/samples/${dir}` }).forEach(file => { glob.sync('**/*.html', { cwd: `test/runtime/samples/${dir}` }).forEach(file => {
try {
const resolved = require.resolve(`../runtime/samples/${dir}/${file}`); const resolved = require.resolve(`../runtime/samples/${dir}/${file}`);
delete require.cache[resolved]; delete require.cache[resolved];
} catch (e) {
// do nothing (probably a directory)
}
}); });
const component = require(`../runtime/samples/${dir}/main.html`); const component = require(`../runtime/samples/${dir}/main.html`);

Loading…
Cancel
Save