-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: split test configs in unit and e2e tests
- Loading branch information
1 parent
5ec9566
commit 50cfd8a
Showing
6 changed files
with
79 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module.exports = { | ||
name: 'e2e', | ||
displayName: 'E2E Tests', | ||
preset: 'ts-jest', | ||
// A list of paths to directories that | ||
// Jest should use to search for files in | ||
roots: [ | ||
'<rootDir>', | ||
], | ||
}; |
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,20 @@ | ||
describe('Synchroniser e2e', () => { | ||
// Mock fetch /splitChanges and /segmentChanges | ||
it('Fetches splits from Split API', () => { | ||
expect(true).toBe(true); | ||
}); | ||
|
||
// Run Synchonizer once | ||
// Assert if the splits and segment objects were stored properly | ||
|
||
// Either run SDK in consumer mode or mock events and impressions in Redis | ||
// const sdk = SplitFactory({...}) | ||
// const client = sdk.client(); | ||
// client.getTreatment | ||
// client.track | ||
|
||
// Run Synchonizer again | ||
|
||
// Assert if the impressions and events were removed from redis and that /impressions and /event endpoints | ||
//were properly called. | ||
}); |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module.exports = { | ||
name: 'unit', | ||
displayName: 'Unit Tests', | ||
preset: 'ts-jest', | ||
// A list of paths to directories that | ||
// Jest should use to search for files in | ||
roots: [ | ||
'<rootDir>', | ||
], | ||
// Test files are .js and .ts files inside of __tests__ folders and with a suffix of .test or .spec | ||
testMatch: ['./**/__tests__/**/?(*.)+(spec|test).[jt]s'], | ||
// Required when using Split dependencies via GitHub | ||
// `"@splitsoftware/splitio-commons": "github:splitio/javascript-commons#branch_name",` | ||
transform: { '../node_modules/@splitsoftware/.+\\.(j|t)s$': 'ts-jest' }, | ||
transformIgnorePatterns: ['/node_modules/(?!@splitsoftware/.*)'], | ||
}; |