Skip to content

Commit 523efd8

Browse files
author
Robert Jackson
committed
Add more failing tests around custom helper functions in options.
1 parent 06073d0 commit 523efd8

2 files changed

Lines changed: 61 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { moduleFor, test } from 'ember-qunit';
2+
3+
moduleFor('stuff:here', {
4+
customFunction() {
5+
return stuff();
6+
}
7+
});
8+
9+
test('users customFunction', function(assert) {
10+
let custom = this.customFunction();
11+
});
12+
13+
moduleFor('stuff:here', {
14+
customFunction() {
15+
return stuff();
16+
},
17+
18+
otherThing(basedOn) {
19+
return this.blah(basedOn);
20+
}
21+
});
22+
23+
test('can have two', function(assert) {
24+
let custom = this.customFunction();
25+
let other = this.otherThing();
26+
});
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import { module, test } from 'qunit';
2+
import { setupTest } from 'ember-qunit';
3+
4+
module('stuff:here', function(hooks) {
5+
setupTest(hooks);
6+
7+
hooks.beforeEach(function() {
8+
this.customFunction = function() {
9+
return stuff();
10+
};
11+
});
12+
13+
test('users customFunction', function(assert) {
14+
let custom = this.customFunction();
15+
});
16+
});
17+
18+
module('stuff:here', function(hooks) {
19+
setupTest(hooks);
20+
21+
hooks.beforeEach(function() {
22+
this.customFunction = function() {
23+
return stuff();
24+
};
25+
26+
this.otherThing = function(basedOn) {
27+
return this.blah(basedOn);
28+
};
29+
});
30+
31+
test('can have two', function(assert) {
32+
let custom = this.customFunction();
33+
let other = this.otherThing();
34+
});
35+
});

0 commit comments

Comments
 (0)