mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-23 01:40:25 +00:00
test(mocks): test mocks with compiled angular
Unfortunately, there people in our team (me), who are not able to use angular.* namespace prefix when writing angular-mocks code, so we need to test it...
This commit is contained in:
parent
2636105c5e
commit
ddf6f1143f
3 changed files with 15 additions and 0 deletions
9
angularFiles.js
vendored
9
angularFiles.js
vendored
|
|
@ -94,6 +94,15 @@ angularFiles = {
|
|||
'build/docs/docs-scenario.js'
|
||||
],
|
||||
|
||||
'jstdMocks': [
|
||||
'lib/jasmine/jasmine.js',
|
||||
'lib/jasmine-jstd-adapter/JasmineAdapter.js',
|
||||
'build/angular.js',
|
||||
'src/angular-mocks.js',
|
||||
'test/matchers.js',
|
||||
'test/angular-mocksSpec.js'
|
||||
],
|
||||
|
||||
'jstdPerf': [
|
||||
'lib/jasmine/jasmine.js',
|
||||
'lib/jasmine-jstd-adapter/JasmineAdapter.js',
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ fs.readFile('angularFiles.js', function(err, data) {
|
|||
fs.writeFile('./jsTestDriver.conf', prefix + combine(angularFiles.jstd,
|
||||
angularFiles.jstdExclude));
|
||||
|
||||
fs.writeFile('./jsTestDriver-mocks.conf', prefix + combine(angularFiles.jstdMocks));
|
||||
|
||||
fs.writeFile('./jsTestDriver-scenario.conf', prefixScenario +
|
||||
combine(angularFiles.jstdScenario) +
|
||||
'\n\nproxy:\n- {matcher: "*", server: "http://localhost:8000"}');
|
||||
|
|
|
|||
4
test-mocks.sh
Executable file
4
test-mocks.sh
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
if [ ! -e test.dissable ]; then
|
||||
java -jar lib/jstestdriver/JsTestDriver.jar --tests all --config jsTestDriver-mocks.conf $@
|
||||
fi
|
||||
Loading…
Reference in a new issue