Skip to content

Commit

Permalink
test: make assertions stricter
Browse files Browse the repository at this point in the history
  • Loading branch information
MrChocolatine committed Oct 18, 2021
1 parent 641da4a commit 8d0672e
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions tests/unit/services/embedded-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,20 @@ module('Unit | Service | embedded', function (hooks) {
setupTest(hooks)

test('it fetches data from the config as a proxy', function (assert) {
// We can access the raw config with `config:embedded`
const config = this.owner.resolveRegistration('config:embedded')
config.myKey = 'myValue'
this.owner.register('config:embedded', {
myKey: 'myValue',
})

const service = this.owner.lookup('service:embedded')
assert.equal(service.get('myKey'), 'myValue')
assert.equal(service.get('doesNotExist'), undefined)

assert.strictEqual(
service.get('myKey'),
'myValue'
)

assert.strictEqual(
service.get('doesNotExist'),
undefined
)
})
})

0 comments on commit 8d0672e

Please sign in to comment.