-
Notifications
You must be signed in to change notification settings - Fork 726
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow deactivating undefined singleton constant value services (#1628)
* test: remove unused tsconfig * style: update test description * fix: allow deactivating singleton undefined values * docs: update changelog
- Loading branch information
1 parent
d6f09a6
commit aec9df3
Showing
5 changed files
with
44 additions
and
29 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { expect } from 'chai'; | ||
|
||
import { Container } from '../../src/inversify'; | ||
|
||
describe('Issue 1515', () => { | ||
it('should not throw on deactivating undefined singleton values', () => { | ||
const container: Container = new Container(); | ||
const symbol: symbol = Symbol.for('foo'); | ||
container.bind(symbol).toConstantValue(undefined); | ||
|
||
console.log(container.get(symbol)); | ||
|
||
container.unbindAll(); | ||
|
||
expect(() => {}).not.to.throw(); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.