From 9af485a584e47fd503ed5c62b9f6482574715f1e Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 10 Oct 2016 03:50:11 +0200 Subject: Squashed 'thirdparty/systemjs/' content from commit 5ed69b6 git-subtree-dir: thirdparty/systemjs git-subtree-split: 5ed69b6344e8fc1cd43bf758350b2236f57e1499 --- test/tests/commonjs-requires.js | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 test/tests/commonjs-requires.js (limited to 'test/tests/commonjs-requires.js') diff --git a/test/tests/commonjs-requires.js b/test/tests/commonjs-requires.js new file mode 100644 index 000000000..af80d8058 --- /dev/null +++ b/test/tests/commonjs-requires.js @@ -0,0 +1,40 @@ +exports.d6 = +/**/require('./commonjs-d2.js'); + +exports.d1 = require( + './commonjs-d.js' +); + +exports.d2 = (require +("./commonjs-d.js")); + +var regex = / \/* /; + +exports.d3 = "require('not a dep')"; + +exports.d4 = "text/* require('still not a dep') text"; + +exports.d5 = 'text \'quote\' require("yet still not a dep")'; + +var regexWithString = /asdfasdf " /; + +var regexClose = /asdf " */; + +// This comment triggered SystemJS to do a require because of this -> require('') +exports.d7 = 'export'; + +var p = false && require('" + "test" + "'); + +// this line shouldn't be detected +" = require(", "),\n "; + + +/* + +Unsolved breaking cases: + +var regex = / " /; var string = " /* " // one line; +require('asdf') // <- this will now be skipped as it will be in the '/*' comment +*//* + +*/ \ No newline at end of file -- cgit v1.2.3