Skip to content

Commit

Permalink
fix the test
Browse files Browse the repository at this point in the history
  • Loading branch information
cherifGsoul committed Jan 15, 2019
1 parent 15b8d99 commit 344bf2c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 2 additions & 0 deletions test/npm_nested_import_errors/dep.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module.exports = {};
require("~/foo");
18 changes: 8 additions & 10 deletions test/npm_nested_import_errors/dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@
window.done = window.parent.done;
window.assert = window.parent.assert;
</script>
<script src="../../steal-with-promises.js" main="@empty"
config="package.json!npm"
src="../../../steal-with-promises.js">
System.import('dep').then(null, function(err){
if(window.assert) {
var stack = err.stack;
window.assert.ok(/dep.js/.test(stack), "dep.js is in the stack");
window.done();
}
});
<script src="../../steal-with-promises.js"
config="package.json!npm"
main="@empty">
steal.import('~/main').then(null, function(err){
var stack = err.stack;
window.assert.ok(/dep.js/.test(stack), "dep.js is in the stack");
window.done();
})
</script>
</body>
</html>
3 changes: 3 additions & 0 deletions test/npm_nested_import_errors/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {};
require('~/dep');

5 changes: 1 addition & 4 deletions test/npm_nested_import_errors/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"name": "npm_nested_import_errors",
"main": "main.js",
"version": "1.0.0",
"dependencies": {
"dep": "1.0.0"
}
"version": "1.0.0"
}

0 comments on commit 344bf2c

Please sign in to comment.