Skip to content

Commit 3b4bfa1

Browse files
Narretzpetebacondarwin
authored andcommitted
refactor(ngMock): extract browserTrigger from ngScenario
`ngScenario` is deprecated, and we expect to remove it from the project in 1.6, but we use the `browserTrigger` helper throughout our unit tests. So in preparation for removing `ngScenario` we are relocating `browserTrigger` to the `ngMock` folder. Although many people are using browserTrigger in their own application testing we are still not yet ready to make this a public API; so developers use this helper at their own risk. Closes angular#14718 BREAKING CHANGE Although it is not a public API, many developers are using `browserTrigger` in their own application testing. We have now moved this helper from `ngScenario/browserTrigger.js` to `ngMock/browserTrigger.js`.
1 parent f3f5cf7 commit 3b4bfa1

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

angularFiles.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ var angularFiles = {
137137
'src/ngSanitize/filter/linky.js'
138138
],
139139
'ngMock': [
140-
'src/ngMock/angular-mocks.js'
140+
'src/ngMock/angular-mocks.js',
141+
'src/ngMock/browserTrigger.js'
141142
],
142143
'ngTouch': [
143144
'src/ngTouch/touch.js',
@@ -152,7 +153,6 @@ var angularFiles = {
152153

153154
'angularScenario': [
154155
'src/ngScenario/Scenario.js',
155-
'src/ngScenario/browserTrigger.js',
156156
'src/ngScenario/Application.js',
157157
'src/ngScenario/Describe.js',
158158
'src/ngScenario/Future.js',
@@ -211,7 +211,6 @@ var angularFiles = {
211211
'build/angular.js',
212212
'@angularSrcModules',
213213
'test/modules/no_bootstrap.js',
214-
'src/ngScenario/browserTrigger.js',
215214
'test/helpers/*.js',
216215
'test/ngAnimate/*.js',
217216
'test/ngMessageFormat/*.js',

src/ngMock/.jshintrc

+6-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55

66
"angular": false,
77
"expect": false,
8-
"jQuery": false
8+
"jQuery": false,
9+
10+
"AnimationEvent": false,
11+
"TransitionEvent": false,
12+
"WebKitAnimationEvent": false,
13+
"WebKitTransitionEvent": false
914
}
1015
}
File renamed without changes.

src/ngScenario/.jshintrc

-4
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@
1313
"_jQuery": false,
1414
"angularInit": false,
1515
"formatException": false,
16-
"AnimationEvent": false,
17-
"TransitionEvent": false,
18-
"WebKitAnimationEvent": false,
19-
"WebKitTransitionEvent": false,
2016
"$runner": false,
2117
"callerFile": false
2218
}

0 commit comments

Comments
 (0)