-
-
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.
## Testing * test: update jest config to ts file * test(global-config): ensure values not bleeding across tests * test: set up multiple test environments * test(collection): add shuffle test * test(api-calls): add connect, trace and options test * test(attributes): clarify variable name * test(helpers): update test name ## Continuous Integration * ci: separate testing for environments * ci: move dependency install step into later jobs * ci: use checkout in later jobs too * ci: use npx to run jest * ci: bump node version ## Features * feat(collection): added `is` method * feat(attributes): create simple access to accessors * feat(api-calls): add options trace and connect request options * feat: add an experimental Getter type ## Documentation * docs: improve documentation accuracy * docs(helpers): add documentation for dataGet * docs: grammar and spacing fixes * docs: add word clarification * docs(attributes): document magic access ## Revert * revert(collection): change introduced in 8d8023a ## Refactor: * refactor: use `in` operator as opposed to hasOwnProperty function * This is compatible with objects without a prototype to inherit from However, this checks the property from the prototype chain * refactor(collection): improve readability of unique function * refactor: improve the type `Data` ## Performance * perf(attributes): iterate objects using for...of on Object.entries * This has a small performance improvement when it comes to using it with large objects * perf(attributes): use an object with no inheritance for original&attributes * This provides a slight performance improvement when it comes to memory * perf: remove lodash in favour of specific lodash modules ## Chores * chore: update dependencies * chore: bump version * chore: add exports for node environments ## Fix * fix(helpers): remove circular dependency between a collection and dataGet * This also means no longer importing the collection when just using dateGet
- Loading branch information
Showing
34 changed files
with
2,523 additions
and
1,497 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
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 was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import type { JestConfigWithTsJest } from 'ts-jest'; | ||
|
||
const commonProjectConfig: Exclude<JestConfigWithTsJest['projects'], undefined>[number] = { | ||
transform: { | ||
// eslint-disable-next-line @typescript-eslint/naming-convention | ||
'^.+\\.[t]sx?$': 'ts-jest' | ||
}, | ||
setupFilesAfterEnv: ['<rootDir>/tests/setupTests.ts'] | ||
}; | ||
|
||
const config: JestConfigWithTsJest = { | ||
preset: 'ts-jest', | ||
rootDir: './', | ||
projects: [ | ||
{ | ||
...commonProjectConfig, | ||
displayName: 'jsdom', | ||
testEnvironment: 'jsdom' | ||
}, | ||
{ | ||
...commonProjectConfig, | ||
displayName: 'node', | ||
testEnvironment: 'node' | ||
} | ||
], | ||
collectCoverageFrom: [ | ||
'<rootDir>/src/**/*.ts', | ||
'!<rootDir>/src/index.ts' | ||
], | ||
cacheDirectory: '<rootDir>/tests/cache', | ||
coverageDirectory: '<rootDir>/tests/coverage', | ||
coverageProvider: 'babel', | ||
coverageReporters: ['json', 'text'], | ||
testMatch: [ | ||
'<rootDir>tests/**/*(*.)@(test).[tj]s?(x)' | ||
], | ||
errorOnDeprecated: true, | ||
bail: true, | ||
sandboxInjectedGlobals: [ | ||
'Function', | ||
'Array', | ||
'String', | ||
'Math', | ||
'Date' | ||
] | ||
}; | ||
|
||
export default config; |
Oops, something went wrong.