test(zone.js): add test codes to ensure not include sourcemap (#31892)
PR Close #31892
This commit is contained in:
parent
f216724c2c
commit
4f42eb4e77
|
@ -100,6 +100,8 @@ genrule(
|
||||||
],
|
],
|
||||||
cmd = " && ".join([
|
cmd = " && ".join([
|
||||||
"mkdir -p $(@D)",
|
"mkdir -p $(@D)",
|
||||||
|
# remove the last line '//# sourceMappingURL=b[0].umd.js.map' because we don't release
|
||||||
|
# source map for now
|
||||||
"sed '$$d' $(@D)/" + b[0].replace("-", "_") + "_rollup.es5umd.js > $(@D)/" + b[0] + ".js",
|
"sed '$$d' $(@D)/" + b[0].replace("-", "_") + "_rollup.es5umd.js > $(@D)/" + b[0] + ".js",
|
||||||
"cp $(@D)/" + b[0].replace("-", "_") + "_rollup.min.es5umd.js $(@D)/" + b[0] + ".min.js",
|
"cp $(@D)/" + b[0].replace("-", "_") + "_rollup.min.es5umd.js $(@D)/" + b[0] + ".min.js",
|
||||||
]),
|
]),
|
||||||
|
@ -174,6 +176,8 @@ genrule(
|
||||||
],
|
],
|
||||||
cmd = " && ".join([
|
cmd = " && ".join([
|
||||||
"mkdir -p $(@D)",
|
"mkdir -p $(@D)",
|
||||||
|
# remove the last line '//# sourceMappingURL=b[0].umd.js.map' because we don't release
|
||||||
|
# source map for now
|
||||||
"sed '$$d' $(@D)/" + b.replace("-", "_") + "_rollup.umd.js > $(@D)/" + b + ".js",
|
"sed '$$d' $(@D)/" + b.replace("-", "_") + "_rollup.umd.js > $(@D)/" + b + ".js",
|
||||||
"cp $(@D)/" + b.replace("-", "_") + "_rollup.min.umd.js $(@D)/" + b + ".min.js",
|
"cp $(@D)/" + b.replace("-", "_") + "_rollup.min.umd.js $(@D)/" + b + ".min.js",
|
||||||
]),
|
]),
|
||||||
|
|
|
@ -49,11 +49,16 @@ describe('Zone.js npm_package', () => {
|
||||||
describe('es5', () => {
|
describe('es5', () => {
|
||||||
it('zone.js(es5) should not contain es6 spread code',
|
it('zone.js(es5) should not contain es6 spread code',
|
||||||
() => { expect(shx.cat('zone.js')).not.toContain('let value of values'); });
|
() => { expect(shx.cat('zone.js')).not.toContain('let value of values'); });
|
||||||
|
|
||||||
|
it('zone.js(es5) should not contain source map comment',
|
||||||
|
() => { expect(shx.cat('zone.js')).not.toContain('sourceMappingURL'); });
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('es2015', () => {
|
describe('es2015', () => {
|
||||||
it('zone-evergreen.js(es2015) should contain es6 code',
|
it('zone-evergreen.js(es2015) should contain es6 code',
|
||||||
() => { expect(shx.cat('zone-evergreen.js')).toContain('let value of values'); });
|
() => { expect(shx.cat('zone-evergreen.js')).toContain('let value of values'); });
|
||||||
|
it('zone.js(es5) should not contain source map comment',
|
||||||
|
() => { expect(shx.cat('zone-evergreen.js')).not.toContain('sourceMappingURL'); });
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('dist file list', () => {
|
describe('dist file list', () => {
|
||||||
|
|
Loading…
Reference in New Issue