File tree Expand file tree Collapse file tree 14 files changed +125
-13
lines changed
mocha-files/tests/unit/__path__
qunit-files/tests/unit/__path__
mocha-files/tests/unit/__path__
qunit-files/tests/unit/__path__
mocha-files/tests/unit/__path__
qunit-files/tests/unit/__path__
mocha-files/tests/unit/__path__
qunit-files/tests/unit/__path__ Expand file tree Collapse file tree 14 files changed +125
-13
lines changed Original file line number Diff line number Diff line change 1
1
/*jshint node:true*/
2
2
3
3
var testInfo = require ( 'ember-cli-test-info' ) ;
4
+ var useTestFrameworkDetector = require ( '../test-framework-detector' ) ;
4
5
5
- module . exports = {
6
+ module . exports = useTestFrameworkDetector ( {
6
7
description : 'Generates an ember-data adapter unit test' ,
8
+
7
9
locals : function ( options ) {
8
10
return {
9
11
friendlyTestDescription : testInfo . description ( options . entity . name , "Unit" , "Adapter" )
10
12
} ;
11
13
}
12
- } ;
14
+ } ) ;
Original file line number Diff line number Diff line change
1
+ /* jshint expr:true */
2
+ import { expect } from 'chai' ;
3
+ import { describeModule , it } from 'ember-mocha' ;
4
+
5
+ describeModule (
6
+ 'adapter:<%= dasherizedModuleName %>' ,
7
+ '<%= friendlyTestDescription %>' ,
8
+ {
9
+ // Specify the other units that are required for this test.
10
+ // needs: ['serializer:foo']
11
+ } ,
12
+ function ( ) {
13
+ // Replace this with your real tests.
14
+ it ( 'exists' , function ( ) {
15
+ let adapter = this . subject ( ) ;
16
+ expect ( adapter ) . to . be . ok ;
17
+ } ) ;
18
+ }
19
+ ) ;
File renamed without changes.
Original file line number Diff line number Diff line change 2
2
3
3
var ModelBlueprint = require ( '../model' ) ;
4
4
var testInfo = require ( 'ember-cli-test-info' ) ;
5
+ var useTestFrameworkDetector = require ( '../test-framework-detector' ) ;
5
6
6
- module . exports = {
7
+ module . exports = useTestFrameworkDetector ( {
7
8
description : 'Generates a model unit test.' ,
8
9
9
10
locals : function ( options ) {
@@ -13,4 +14,4 @@ module.exports = {
13
14
14
15
return result ;
15
16
}
16
- } ;
17
+ } ) ;
Original file line number Diff line number Diff line change
1
+ /* jshint expr:true */
2
+ import { expect } from 'chai' ;
3
+ import { describeModel , it } from 'ember-mocha' ;
4
+
5
+ describeModel (
6
+ '<%= dasherizedModuleName %>' ,
7
+ '<%= friendlyDescription %>' ,
8
+ {
9
+ // Specify the other units that are required for this test.
10
+ < %= typeof needs !== 'undefined' ? needs : '' % >
11
+ } ,
12
+ function ( ) {
13
+ // Replace this with your real tests.
14
+ it ( 'exists' , function ( ) {
15
+ let model = this . subject ( ) ;
16
+ // var store = this.store();
17
+ expect ( model ) . to . be . ok ;
18
+ } ) ;
19
+ }
20
+ ) ;
File renamed without changes.
Original file line number Diff line number Diff line change 1
1
/*jshint node:true*/
2
2
3
3
var testInfo = require ( 'ember-cli-test-info' ) ;
4
+ var useTestFrameworkDetector = require ( '../test-framework-detector' ) ;
4
5
5
- module . exports = {
6
+ module . exports = useTestFrameworkDetector ( {
6
7
description : 'Generates a serializer unit test.' ,
8
+
7
9
locals : function ( options ) {
8
10
return {
9
11
friendlyTestDescription : testInfo . description ( options . entity . name , "Unit" , "Serializer" )
10
12
} ;
11
- } ,
12
- } ;
13
+ }
14
+ } ) ;
Original file line number Diff line number Diff line change
1
+ /* jshint expr:true */
2
+ import { expect } from 'chai' ;
3
+ import { describeModel , it } from 'ember-mocha' ;
4
+
5
+ describeModel (
6
+ '<%= dasherizedModuleName %>' ,
7
+ '<%= friendlyTestDescription %>' ,
8
+ {
9
+ // Specify the other units that are required for this test.
10
+ needs : [ 'serializer:<%= dasherizedModuleName %>' ]
11
+ } ,
12
+ function ( ) {
13
+ // Replace this with your real tests.
14
+ it ( 'serializes records' , function ( ) {
15
+ let record = this . subject ( ) ;
16
+
17
+ let serializedRecord = record . serialize ( ) ;
18
+
19
+ expect ( serializedRecord ) . to . be . ok ;
20
+ } ) ;
21
+ }
22
+ ) ;
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ var path = require ( 'path' ) ;
2
+
3
+ module . exports = function ( blueprint ) {
4
+ blueprint . supportsAddon = function ( ) {
5
+ return false ;
6
+ } ;
7
+
8
+ blueprint . filesPath = function ( ) {
9
+ var type ;
10
+
11
+ if ( 'ember-cli-mocha' in this . project . addonPackages ) {
12
+ type = 'mocha' ;
13
+ } else if ( 'ember-cli-qunit' in this . project . addonPackages ) {
14
+ type = 'qunit' ;
15
+ } else {
16
+ this . ui . writeLine ( 'Couldn\'t determine test style - using QUnit' ) ;
17
+ type = 'qunit' ;
18
+ }
19
+
20
+ return path . join ( this . path , type + '-files' ) ;
21
+ } ;
22
+
23
+ return blueprint ;
24
+ } ;
Original file line number Diff line number Diff line change 1
1
/*jshint node:true*/
2
2
3
3
var testInfo = require ( 'ember-cli-test-info' ) ;
4
+ var useTestFrameworkDetector = require ( '../test-framework-detector' ) ;
4
5
5
- module . exports = {
6
+ module . exports = useTestFrameworkDetector ( {
6
7
description : 'Generates a transform unit test.' ,
8
+
7
9
locals : function ( options ) {
8
10
return {
9
11
friendlyTestDescription : testInfo . description ( options . entity . name , "Unit" , "Transform" )
10
12
} ;
11
- } ,
12
- } ;
13
+ }
14
+ } ) ;
Original file line number Diff line number Diff line change
1
+ /* jshint expr:true */
2
+ import { expect } from 'chai' ;
3
+ import { describeModule , it } from 'ember-mocha' ;
4
+
5
+ describeModule (
6
+ 'transform:<%= dasherizedModuleName %>' ,
7
+ '<%= friendlyTestDescription %>' ,
8
+ {
9
+ // Specify the other units that are required for this test.
10
+ // needs: ['transform:foo']
11
+ } ,
12
+ function ( ) {
13
+ // Replace this with your real tests.
14
+ it ( 'exists' , function ( ) {
15
+ let transform = this . subject ( ) ;
16
+ expect ( transform ) . to . be . ok ;
17
+ } ) ;
18
+ }
19
+ ) ;
File renamed without changes.
Original file line number Diff line number Diff line change 53
53
"broccoli-yuidoc" : " ^2.1.0" ,
54
54
"ember-cli" : " 1.13.12" ,
55
55
"ember-cli-app-version" : " 0.5.0" ,
56
- "ember-cli-blueprint-test-helpers" : " ^0.6 .0" ,
56
+ "ember-cli-blueprint-test-helpers" : " ^0.8 .0" ,
57
57
"ember-cli-content-security-policy" : " 0.4.0" ,
58
58
"ember-cli-dependency-checker" : " ^1.0.1" ,
59
59
"ember-cli-htmlbars" : " 0.7.9" ,
60
60
"ember-cli-htmlbars-inline-precompile" : " ^0.2.0" ,
61
61
"ember-cli-ic-ajax" : " 0.2.1" ,
62
62
"ember-cli-inject-live-reload" : " ^1.3.1" ,
63
- "ember-cli-internal-test-helpers" : " ^0.5 .0" ,
63
+ "ember-cli-internal-test-helpers" : " ^0.8 .0" ,
64
64
"ember-cli-qunit" : " ^1.0.0" ,
65
65
"ember-cli-release" : " 0.2.3" ,
66
66
"ember-cli-uglify" : " ^1.2.0" ,
87
87
"configPath" : " tests/dummy/config" ,
88
88
"paths" : [
89
89
" lib/enable-optional-features-via-url"
90
- ]
90
+ ],
91
+ "after" : " ember-cli-mocha"
91
92
}
92
93
}
You can’t perform that action at this time.
0 commit comments