Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5230 from webpack/bugfix/typeof-require-resolve
emit correct code for typeof require.resolve(Weak), require and requirejs.onError
- Loading branch information
Showing
6 changed files
with
18 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
it("should ignore require.config", function() { | ||
require.config({ | ||
|
||
}); | ||
requirejs.config({ | ||
|
||
}); | ||
}); | ||
it("should have a require.version", function() { | ||
require.version.should.be.type("string"); | ||
}); | ||
it("should have a requirejs.onError function", function() { | ||
function f(){} | ||
requirejs.onError.should.be.type("function"); // has default handler | ||
var org = requirejs.onError; | ||
requirejs.onError = f; | ||
requirejs.onError.should.be.eql(f); | ||
requirejs.onError = org; | ||
require(["./file.js"], function() {}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters