File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,7 +97,6 @@ example_integration_test(
9797example_integration_test (
9898 name = "examples_webapp" ,
9999 npm_packages = {
100- "//packages/jasmine:npm_package" : "@bazel/jasmine" ,
101100 "//packages/protractor:npm_package" : "@bazel/protractor" ,
102101 "//packages/rollup:npm_package" : "@bazel/rollup" ,
103102 "//packages/terser:npm_package" : "@bazel/terser" ,
Original file line number Diff line number Diff line change 11load ("@npm//http-server:index.bzl" , "http_server" )
2- load ("@npm_bazel_jasmine// :index.bzl" , "jasmine_node_test " )
2+ load ("@npm//mocha :index.bzl" , "mocha_test " )
33load ("@npm_bazel_protractor//:index.bzl" , "protractor_web_test_suite" )
44load (":differential_loading.bzl" , "differential_loading" )
55
@@ -31,14 +31,27 @@ protractor_web_test_suite(
3131 ],
3232)
3333
34- jasmine_node_test (
34+ mocha_test (
3535 name = "test_sourcemaps" ,
36- srcs = ["sourcemaps.spec.js" ],
37- deps = [
36+ # if we were in a subdirectory we'd need
37+ # package_name() + "/*.spec.js"
38+ args = ["*.spec.js" ],
39+ data = [
40+ "sourcemaps.spec.js" ,
3841 ":app_chunks" ,
3942 ":app_chunks.min" ,
4043 ":app_chunks_es5" ,
4144 ":app_chunks_es5.min" ,
4245 "@npm//source-map" ,
4346 ],
47+ tags = [
48+ # Need to set the pwd to avoid mocha needing a runfiles helper
49+ "no-bazelci-windows" ,
50+ ],
51+ )
52+
53+ # Just a dummy test so that we have a test target for //... on certain bazelci platforms with bazel_integration_test
54+ sh_test (
55+ name = "dummy_test" ,
56+ srcs = ["dummy_test.sh" ],
4457)
Original file line number Diff line number Diff line change 44 "@babel/cli" : " ^7.6.0" ,
55 "@babel/core" : " ^7.6.0" ,
66 "@babel/preset-env" : " ^7.6.0" ,
7- "@bazel/jasmine" : " ^0.38.0" ,
87 "@bazel/protractor" : " ^0.38.0" ,
98 "@bazel/rollup" : " ^0.38.0" ,
109 "@bazel/terser" : " ^0.38.0" ,
1110 "@bazel/typescript" : " ^0.38.0" ,
1211 "http-server" : " ^0.11.1" ,
12+ "mocha" : " ^6.2.1" ,
1313 "rollup" : " 1.21.4" ,
1414 "source-map" : " ^0.7.3" ,
1515 "terser" : " ^4.3.1" ,
Original file line number Diff line number Diff line change 11// Ensure we have working sourcemaps when the app runs in a browser
22
3+ const assert = require ( 'assert' ) ;
34const fs = require ( 'fs' ) ;
45const path = require ( 'path' ) ;
56const sm = require ( 'source-map' ) ;
@@ -38,9 +39,9 @@ function asserts(pos) {
3839 // so it actually starts with a bunch of '/../..'
3940 // expect(pos.source).toBe('index.mjs');
4041
41- expect ( pos . source . endsWith ( 'index.mjs' ) ) . toBeTruthy ( ) ;
42- expect ( pos . line ) . toBe ( 7 ) ; // one-based
43- expect ( pos . column ) . toBe ( 20 ) ; // zero-based
42+ assert ( pos . source . endsWith ( 'index.mjs' ) ) ;
43+ assert ( pos . line == 7 ) ; // one-based
44+ assert ( pos . column == 20 ) ; // zero-based
4445}
4546
4647describe ( 'application sourcemaps in the browser' , ( ) => {
You can’t perform that action at this time.
0 commit comments