Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions package.json.test-scripts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// Add these scripts to your package.json file:

{
"scripts": {
// Existing scripts...

// Location-specific test scripts
"test:location": "jest --testPathPattern=location",
"test:location:unit": "jest test/location-unit.spec.ts",
"test:location:refactored": "jest test/location-refactored.spec.ts",
"test:location:e2e": "jest --config ./test/jest-e2e.json test/location.e2e-spec.ts",
"test:location:performance": "jest --config ./test/jest-e2e.json test/location-performance.spec.ts",
"test:location:all": "npm run test:location:refactored && npm run test:location:e2e && npm run test:location:performance",

// Coverage reports
"test:location:coverage": "jest --testPathPattern=location --coverage",
"test:location:watch": "jest --testPathPattern=location --watch",

// Full test suite
"test:e2e:all": "jest --config ./test/jest-e2e.json",
"test:full": "npm run test && npm run test:e2e:all"
},

"jest": {
"moduleFileExtensions": ["js", "json", "ts"],
"rootDir": "src",
"testRegex": ".*\\.spec\\.ts$",
"transform": {
"^.+\\.(t|j)s$": "ts-jest"
},
"collectCoverageFrom": [
"**/*.(t|j)s"
],
"coverageDirectory": "../coverage",
"testEnvironment": "node"
}
}
Loading