-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX release] Fix generated import paths for test setup functions …
…in addons (#8013)
- Loading branch information
1 parent
453fb4d
commit 0fb37af
Showing
25 changed files
with
277 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/adapter/blueprints/adapter-test/mocha-rfc-232-files/__root__/__path__/__test__.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/adapter/blueprints/adapter-test/qunit-files/__root__/__path__/__test__.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
packages/adapter/node-tests/fixtures/adapter-test/mocha-rfc232-addon.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { expect } from 'chai'; | ||
import { describe, it } from 'mocha'; | ||
import { setupTest } from 'dummy/tests/helpers'; | ||
|
||
describe('Unit | Adapter | foo', function() { | ||
setupTest(); | ||
|
||
// Replace this with your real tests. | ||
it('exists', function() { | ||
let adapter = this.owner.lookup('adapter:foo'); | ||
expect(adapter).to.be.ok; | ||
}); | ||
}); |
12 changes: 12 additions & 0 deletions
12
packages/adapter/node-tests/fixtures/adapter-test/rfc232-addon.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { module, test } from 'qunit'; | ||
import { setupTest } from 'dummy/tests/helpers'; | ||
|
||
module('Unit | Adapter | foo', function(hooks) { | ||
setupTest(hooks); | ||
|
||
// Replace this with your real tests. | ||
test('it exists', function(assert) { | ||
let adapter = this.owner.lookup('adapter:foo'); | ||
assert.ok(adapter); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/model/blueprints/model-test/mocha-rfc-232-files/__root__/__path__/__test__.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/model/blueprints/model-test/qunit-files/__root__/__path__/__test__.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
packages/model/node-tests/fixtures/model-test/mocha-rfc232-addon.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { expect } from 'chai'; | ||
import { describe, it } from 'mocha'; | ||
import { setupTest } from 'dummy/tests/helpers'; | ||
|
||
describe('Unit | Model | foo', function() { | ||
setupTest(); | ||
|
||
// Replace this with your real tests. | ||
it('exists', function() { | ||
let store = this.owner.lookup('service:store'); | ||
let model = store.createRecord('foo', {}); | ||
expect(model).to.be.ok; | ||
}); | ||
}); |
13 changes: 13 additions & 0 deletions
13
packages/model/node-tests/fixtures/model-test/rfc232-addon.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { module, test } from 'qunit'; | ||
import { setupTest } from 'dummy/tests/helpers'; | ||
|
||
module('Unit | Model | foo', function(hooks) { | ||
setupTest(hooks); | ||
|
||
// Replace this with your real tests. | ||
test('it exists', function(assert) { | ||
let store = this.owner.lookup('service:store'); | ||
let model = store.createRecord('foo', {}); | ||
assert.ok(model); | ||
}); | ||
}); |
5 changes: 5 additions & 0 deletions
5
packages/private-build-infra/src/utilities/module-prefix-for-project.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const { dasherize } = require('ember-cli-string-utils'); | ||
|
||
module.exports = function modulePrefixForProject(project) { | ||
return dasherize(project.config().modulePrefix); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...s/serializer/blueprints/serializer-test/mocha-rfc-232-files/__root__/__path__/__test__.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/serializer/blueprints/serializer-test/qunit-files/__root__/__path__/__test__.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...es/serializer/blueprints/transform-test/mocha-rfc-232-files/__root__/__path__/__test__.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/serializer/blueprints/transform-test/qunit-files/__root__/__path__/__test__.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
packages/serializer/node-tests/fixtures/serializer-test/mocha-rfc232-addon.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { expect } from 'chai'; | ||
import { describe, it } from 'mocha'; | ||
import { setupTest } from 'dummy/tests/helpers'; | ||
|
||
describe('Unit | Serializer | foo', function() { | ||
setupTest(); | ||
|
||
// Replace this with your real tests. | ||
it('exists', function() { | ||
let store = this.owner.lookup('service:store'); | ||
let serializer = store.serializerFor('foo'); | ||
|
||
expect(serializer).to.be.ok; | ||
}); | ||
|
||
it('serializes records', function() { | ||
let store = this.owner.lookup('service:store'); | ||
let record = store.createRecord('foo', {}); | ||
|
||
let serializedRecord = record.serialize(); | ||
|
||
expect(serializedRecord).to.be.ok; | ||
}); | ||
}); |
23 changes: 23 additions & 0 deletions
23
packages/serializer/node-tests/fixtures/serializer-test/rfc232-addon.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { module, test } from 'qunit'; | ||
import { setupTest } from 'dummy/tests/helpers'; | ||
|
||
module('Unit | Serializer | foo', function(hooks) { | ||
setupTest(hooks); | ||
|
||
// Replace this with your real tests. | ||
test('it exists', function(assert) { | ||
let store = this.owner.lookup('service:store'); | ||
let serializer = store.serializerFor('foo'); | ||
|
||
assert.ok(serializer); | ||
}); | ||
|
||
test('it serializes records', function(assert) { | ||
let store = this.owner.lookup('service:store'); | ||
let record = store.createRecord('foo', {}); | ||
|
||
let serializedRecord = record.serialize(); | ||
|
||
assert.ok(serializedRecord); | ||
}); | ||
}); |
Oops, something went wrong.