FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
angular2-app/config/spec-bundle.js at master · springboot-angular2-tutorial/angular2-app · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
springboot-angular2-tutorial
/
angular2-app
Public
Notifications
You must be signed in to change notification settings
Fork
46
Star
141
Code
Issues
1
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
angular2-app
/
config
/
spec-bundle.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
62 lines (52 loc) · 2.02 KB
Breadcrumbs
angular2-app
/
config
/
spec-bundle.js
Copy path
File metadata and controls
62 lines (52 loc) · 2.02 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/**
*
@author
: @AngularClass
*/
/*
* When testing with webpack and ES6, we have to do some extra
* things to get testing to work right. Because we are gonna write tests
* in ES6 too, we have to compile those as well. That's handled in
* karma.conf.js with the karma-webpack plugin. This is the entry
* file for webpack test. Just like webpack will create a bundle.js
* file for our client, when we run test, it will compile and bundle them
* all here! Crazy huh. So we need to do some setup
*/
Error
.
stackTraceLimit
=
Infinity
;
require
(
'core-js/es6'
)
;
require
(
'core-js/es7/reflect'
)
;
// Typescript emit helpers polyfill
require
(
'ts-helpers'
)
;
require
(
'zone.js/dist/zone'
)
;
require
(
'zone.js/dist/long-stack-trace-zone'
)
;
require
(
'zone.js/dist/proxy'
)
;
// since zone.js 0.6.15
require
(
'zone.js/dist/sync-test'
)
;
require
(
'zone.js/dist/jasmine-patch'
)
;
// put here since zone.js 0.6.14
require
(
'zone.js/dist/async-test'
)
;
require
(
'zone.js/dist/fake-async-test'
)
;
// RxJS
require
(
'rxjs/Rx'
)
;
var
testing
=
require
(
'@angular/core/testing'
)
;
var
browser
=
require
(
'@angular/platform-browser-dynamic/testing'
)
;
testing
.
TestBed
.
initTestEnvironment
(
browser
.
BrowserDynamicTestingModule
,
browser
.
platformBrowserDynamicTesting
(
)
)
;
/*
* Ok, this is kinda crazy. We can use the context method on
* require that webpack created in order to tell webpack
* what files we actually want to require or import.
* Below, context will be a function/object with file names as keys.
* Using that regex we are saying look in ../src then find
* any file that ends with spec.ts and get its path. By passing in true
* we say do this recursively
*/
var
testContext
=
require
.
context
(
'../src'
,
true
,
/
\.
s
p
e
c
\.
t
s
/
)
;
/*
* get all the files, for each file, call the context function
* that will require the file and load it up here. Context will
* loop and require those spec files here
*/
function
requireAll
(
requireContext
)
{
return
requireContext
.
keys
(
)
.
map
(
requireContext
)
;
}
// requires and returns all modules that match
var
modules
=
requireAll
(
testContext
)
;
Back
|
FazBrowse Home
|
New Git URL