Skip to content

Commit fb01551

Browse files
committed
chore: allow running Dart/JS Karma at the same time
Use `9876` port for JS. Use `9877` port for Dart.
1 parent 5818c3b commit fb01551

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

karma-dart.conf.js

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,25 @@ module.exports = function(config) {
2828
guinness: 'package:guinness/guinness_html.dart'
2929
},
3030

31+
// TODO(vojta): Remove the localhost:9877 from urls, once the proxy fix is merged:
32+
// https://github.com/karma-runner/karma/pull/1207
33+
//
3134
// Map packages to the correct urls where Karma serves them.
3235
proxies: {
3336
// Dependencies installed with `pub install`.
34-
'/packages/unittest': '/base/packages/unittest',
35-
'/packages/guinness': '/base/packages/guinness',
36-
'/packages/matcher': '/base/packages/matcher',
37-
'/packages/stack_trace': '/base/packages/stack_trace',
38-
'/packages/collection': '/base/packages/collection',
39-
'/packages/path': '/base/packages/path',
37+
'/packages/unittest': 'http://localhost:9877/base/packages/unittest',
38+
'/packages/guinness': 'http://localhost:9877/base/packages/guinness',
39+
'/packages/matcher': 'http://localhost:9877/base/packages/matcher',
40+
'/packages/stack_trace': 'http://localhost:9877/base/packages/stack_trace',
41+
'/packages/collection': 'http://localhost:9877/base/packages/collection',
42+
'/packages/path': 'http://localhost:9877/base/packages/path',
4043

4144
// Local dependencies, transpiled from the source.
42-
'/packages/core': '/base/modules/core/src',
43-
'/packages/change_detection': '/base/modules/change_detection/src',
44-
'/packages/di': '/base/modules/di/src',
45-
'/packages/facade': '/base/modules/facade/src',
46-
'/packages/test_lib': '/base/modules/test_lib/src',
45+
'/packages/core': 'http://localhost:9877/base/modules/core/src',
46+
'/packages/change_detection': 'http://localhost:9877/base/modules/change_detection/src',
47+
'/packages/di': 'http://localhost:9877/base/modules/di/src',
48+
'/packages/facade': 'http://localhost:9877/base/modules/facade/src',
49+
'/packages/test_lib': 'http://localhost:9877/base/modules/test_lib/src',
4750
},
4851

4952
preprocessors: {
@@ -73,6 +76,8 @@ module.exports = function(config) {
7376
flags: ['--enable-experimental-web-platform-features'] }
7477
},
7578
browsers: ['DartiumWithWebPlatform'],
79+
80+
port: 9877
7681
});
7782

7883

karma-js.conf.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ module.exports = function(config) {
5050
flags: ['--enable-experimental-web-platform-features'] }
5151
},
5252
browsers: ['ChromeCanary'],
53+
54+
port: 9876
5355
});
5456

5557
config.plugins.push(require('./tools/transpiler/karma-traceur-preprocessor'));

0 commit comments

Comments
 (0)