2014-07-17 02:57:10 +08:00
|
|
|
it("should have a relative url to the source-map", function() {
|
|
|
|
var fs = require("fs");
|
|
|
|
var source = fs.readFileSync(__filename, "utf-8");
|
|
|
|
var match = /sourceMappingURL\s*=\s*(.*)/.exec(source);
|
2018-01-27 05:51:03 +08:00
|
|
|
expect(match[1]).toBe("bundle0.js.map");
|
2014-07-17 02:57:10 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
it("should have a relative url to the source-map with prefix", function(done) {
|
|
|
|
require.ensure([], function(require) {
|
2018-01-27 23:05:21 +08:00
|
|
|
global.expect = expect;
|
2014-07-17 02:57:10 +08:00
|
|
|
require("./test.js");
|
|
|
|
done();
|
|
|
|
});
|
|
|
|
});
|