File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -673,6 +673,10 @@ jobs:
673673 # Run zone.js tools tests
674674 - run : yarn --cwd packages/zone.js promisetest
675675 - run : yarn --cwd packages/zone.js promisefinallytest
676+ - run : yarn bazel build //packages/zone.js:npm_package &&
677+ cp dist/bin/packages/zone.js/npm_package/dist/zone-mix.js ./packages/zone.js/test/extra/ &&
678+ cp dist/bin/packages/zone.js/npm_package/dist/zone-patch-electron.js ./packages/zone.js/test/extra/ &&
679+ yarn --cwd packages/zone.js electrontest
676680
677681workflows :
678682 version : 2
Original file line number Diff line number Diff line change 66 * found in the LICENSE file at https://angular.io/license
77 */
88
9- import '../zone' ;
10- import '../common/promise' ;
11- import '../common/to-string' ;
12- import '../browser/browser' ;
9+ import '../browser/rollup-main' ;
1310import '../node/node' ;
Original file line number Diff line number Diff line change 1515 "test" : " test"
1616 },
1717 "devDependencies" : {
18+ "domino" : " 2.1.2" ,
1819 "mocha" : " ^3.1.2" ,
20+ "mock-require" : " 3.0.3" ,
1921 "promises-aplus-tests" : " ^2.1.2" ,
2022 "typescript" : " ~3.4.2"
2123 },
2224 "scripts" : {
2325 "promisetest" : " tsc -p . && node ./promise-test.js" ,
24- "promisefinallytest" : " tsc -p . && mocha promise.finally.spec.js"
26+ "promisefinallytest" : " tsc -p . && mocha promise.finally.spec.js" ,
27+ "electrontest" : " cd test/extra && node electron.js"
2528 },
2629 "repository" : {
2730 "type" : " git" ,
Original file line number Diff line number Diff line change 1+ /**
2+ * @license
3+ * Copyright Google Inc. All Rights Reserved.
4+ *
5+ * Use of this source code is governed by an MIT-style license that can be
6+ * found in the LICENSE file at https://angular.io/license
7+ */
8+ var domino = require ( 'domino' ) ;
9+ var mockRequire = require ( 'mock-require' ) ;
10+ var nativeTimeout = setTimeout ;
11+ require ( './zone-mix' ) ;
12+ mockRequire ( 'electron' , {
13+ desktopCapturer : { getSources : function ( callback ) { nativeTimeout ( callback ) ; } } ,
14+ shell : { openExternal : function ( callback ) { nativeTimeout ( callback ) ; } } ,
15+ ipcRenderer : { on : function ( callback ) { nativeTimeout ( callback ) ; } } ,
16+ } ) ;
17+ require ( './zone-patch-electron' ) ;
18+ var electron = require ( 'electron' ) ;
19+ var zone = Zone . current . fork ( { name : 'zone' } ) ;
20+ zone . run ( function ( ) {
21+ electron . desktopCapturer . getSources ( function ( ) {
22+ if ( Zone . current . name !== 'zone' ) {
23+ process . exit ( 1 ) ;
24+ }
25+ } ) ;
26+ electron . shell . openExternal ( function ( ) {
27+ console . log ( 'shell' , Zone . current . name ) ;
28+ if ( Zone . current . name !== 'zone' ) {
29+ process . exit ( 1 ) ;
30+ }
31+ } ) ;
32+ electron . ipcRenderer . on ( function ( ) {
33+ if ( Zone . current . name !== 'zone' ) {
34+ process . exit ( 1 ) ;
35+ }
36+ } ) ;
37+ } ) ;
You can’t perform that action at this time.
0 commit comments