-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
622 additions
and
391 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
10 changes: 7 additions & 3 deletions
10
src/server/__tests__/config.test.js → src/server/__tests__/config.test.ts
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 |
---|---|---|
@@ -1,10 +1,14 @@ | ||
import { getDatabase } from '../config'; | ||
import { FlatFile } from 'boardgame.io/server'; | ||
|
||
const env = process.env; | ||
|
||
afterEach(() => { | ||
process.env = env; | ||
}); | ||
|
||
it('returns correct FlatFile database', () => { | ||
process.env = { | ||
DATA_STORE: 'whatever', | ||
}; | ||
process.env.DATA_STORE = 'whatever'; | ||
const db = getDatabase(); | ||
expect(db).toBeInstanceOf(FlatFile); | ||
}); |
Oops, something went wrong.