chore(setup): fix running unit tests in all packages
This commit is contained in:
@@ -22,7 +22,7 @@
|
|||||||
"prebuild": "yarn clean",
|
"prebuild": "yarn clean",
|
||||||
"build": "tsc -p tsconfig.json",
|
"build": "tsc -p tsconfig.json",
|
||||||
"lint": "eslint . --ext .ts",
|
"lint": "eslint . --ext .ts",
|
||||||
"test:unit": "jest spec --coverage"
|
"test": "jest spec --coverage"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^28.1.5",
|
"@types/jest": "^28.1.5",
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
"prebuild": "yarn clean",
|
"prebuild": "yarn clean",
|
||||||
"build": "tsc -p tsconfig.json",
|
"build": "tsc -p tsconfig.json",
|
||||||
"lint": "eslint . --ext .ts",
|
"lint": "eslint . --ext .ts",
|
||||||
"test:unit": "jest"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@standardnotes/auth": "^3.19.4",
|
"@standardnotes/auth": "^3.19.4",
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
"prebuild": "yarn clean",
|
"prebuild": "yarn clean",
|
||||||
"build": "tsc -p tsconfig.json",
|
"build": "tsc -p tsconfig.json",
|
||||||
"lint": "eslint . --ext .ts",
|
"lint": "eslint . --ext .ts",
|
||||||
"test:unit": "jest"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^28.1.5",
|
"@types/jest": "^28.1.5",
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
"prebuild": "yarn clean",
|
"prebuild": "yarn clean",
|
||||||
"build": "tsc -p tsconfig.json",
|
"build": "tsc -p tsconfig.json",
|
||||||
"lint": "eslint . --ext .ts",
|
"lint": "eslint . --ext .ts",
|
||||||
"test:unit": "jest"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^28.1.5",
|
"@types/jest": "^28.1.5",
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
"prebuild": "yarn clean",
|
"prebuild": "yarn clean",
|
||||||
"build": "tsc -p tsconfig.json",
|
"build": "tsc -p tsconfig.json",
|
||||||
"lint": "eslint . --ext .ts",
|
"lint": "eslint . --ext .ts",
|
||||||
"test:unit": "jest"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^28.1.5",
|
"@types/jest": "^28.1.5",
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
"prebuild": "yarn clean",
|
"prebuild": "yarn clean",
|
||||||
"build": "tsc -p tsconfig.json",
|
"build": "tsc -p tsconfig.json",
|
||||||
"lint": "eslint . --ext .ts",
|
"lint": "eslint . --ext .ts",
|
||||||
"test:unit": "jest spec --coverage --passWithNoTests"
|
"test": "jest spec --coverage --passWithNoTests"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^28.1.5",
|
"@types/jest": "^28.1.5",
|
||||||
|
|||||||
@@ -7,5 +7,13 @@ module.exports = {
|
|||||||
'ts-jest': {
|
'ts-jest': {
|
||||||
tsconfig: 'tsconfig.json',
|
tsconfig: 'tsconfig.json',
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
coverageThreshold: {
|
||||||
|
global: {
|
||||||
|
branches: 9,
|
||||||
|
functions: 9,
|
||||||
|
lines: 16,
|
||||||
|
statements: 16
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
"prebuild": "yarn clean",
|
"prebuild": "yarn clean",
|
||||||
"build": "tsc -p tsconfig.json",
|
"build": "tsc -p tsconfig.json",
|
||||||
"lint": "eslint . --ext .ts",
|
"lint": "eslint . --ext .ts",
|
||||||
"test:unit": "jest spec --coverage"
|
"test": "jest spec --coverage"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@standardnotes/auth": "^3.19.4",
|
"@standardnotes/auth": "^3.19.4",
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
import {
|
|
||||||
InternalEventBusInterface,
|
|
||||||
SyncServiceInterface,
|
|
||||||
ItemManagerInterface,
|
|
||||||
AlertService,
|
|
||||||
ApiServiceInterface,
|
|
||||||
ChallengeServiceInterface,
|
|
||||||
} from '@standardnotes/services'
|
|
||||||
import { FileService } from './FileService'
|
|
||||||
import { PureCryptoInterface, StreamEncryptor } from '@standardnotes/sncrypto-common'
|
import { PureCryptoInterface, StreamEncryptor } from '@standardnotes/sncrypto-common'
|
||||||
import { FileItem } from '@standardnotes/models'
|
import { FileItem } from '@standardnotes/models'
|
||||||
import { EncryptionProvider } from '@standardnotes/encryption'
|
import { EncryptionProvider } from '@standardnotes/encryption'
|
||||||
|
|
||||||
|
import { ItemManagerInterface } from '../Item/ItemManagerInterface'
|
||||||
|
import { ChallengeServiceInterface } from '../Challenge'
|
||||||
|
import { InternalEventBusInterface } from '..'
|
||||||
|
import { AlertService } from '../Alert/AlertService'
|
||||||
|
import { ApiServiceInterface } from '../Api/ApiServiceInterface'
|
||||||
|
import { SyncServiceInterface } from '../Sync/SyncServiceInterface'
|
||||||
|
|
||||||
|
import { FileService } from './FileService'
|
||||||
|
|
||||||
describe('fileService', () => {
|
describe('fileService', () => {
|
||||||
let apiService: ApiServiceInterface
|
let apiService: ApiServiceInterface
|
||||||
let itemManager: ItemManagerInterface
|
let itemManager: ItemManagerInterface
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
"build": "tsc -p tsconfig.json",
|
"build": "tsc -p tsconfig.json",
|
||||||
"watch": "tsc -p tsconfig.json --watch",
|
"watch": "tsc -p tsconfig.json --watch",
|
||||||
"lint": "eslint . --ext .ts",
|
"lint": "eslint . --ext .ts",
|
||||||
"test:unit": "yarn lint"
|
"test": "yarn lint"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@typescript-eslint/eslint-plugin": "^5.30.0",
|
"@typescript-eslint/eslint-plugin": "^5.30.0",
|
||||||
|
|||||||
@@ -58,5 +58,5 @@ yarn start:server:e2e
|
|||||||
From the root of the repository, run:
|
From the root of the repository, run:
|
||||||
|
|
||||||
```
|
```
|
||||||
yarn run test:unit
|
yarn run test
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ module.exports = {
|
|||||||
branches: 13,
|
branches: 13,
|
||||||
functions: 22,
|
functions: 22,
|
||||||
lines: 27,
|
lines: 27,
|
||||||
statements: 28,
|
statements: 27,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
"lint": "yarn lint:tsc && yarn lint:eslint",
|
"lint": "yarn lint:tsc && yarn lint:eslint",
|
||||||
"lint:eslint": "eslint --ext .ts lib/",
|
"lint:eslint": "eslint --ext .ts lib/",
|
||||||
"lint:tsc": "tsc --noEmit --emitDeclarationOnly false --project lib/tsconfig.json",
|
"lint:tsc": "tsc --noEmit --emitDeclarationOnly false --project lib/tsconfig.json",
|
||||||
"test:unit": "jest spec --coverage",
|
"test": "jest spec --coverage",
|
||||||
"test:debug": "node --inspect-brk node_modules/.bin/jest --runInBand"
|
"test:debug": "node --inspect-brk node_modules/.bin/jest --runInBand"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
"prebuild": "yarn clean",
|
"prebuild": "yarn clean",
|
||||||
"build": "tsc -p tsconfig.json",
|
"build": "tsc -p tsconfig.json",
|
||||||
"lint": "eslint . --ext .ts",
|
"lint": "eslint . --ext .ts",
|
||||||
"test:unit": "jest spec --coverage"
|
"test": "jest spec --coverage --passWithNoTests"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@standardnotes/common": "^1.30.0",
|
"@standardnotes/common": "^1.30.0",
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
"prebuild": "yarn clean",
|
"prebuild": "yarn clean",
|
||||||
"build": "tsc -p tsconfig.json",
|
"build": "tsc -p tsconfig.json",
|
||||||
"lint": "eslint . --ext .ts",
|
"lint": "eslint . --ext .ts",
|
||||||
"test:unit": "jest spec"
|
"test": "jest spec"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@standardnotes/common": "^1.23.1",
|
"@standardnotes/common": "^1.23.1",
|
||||||
|
|||||||
Reference in New Issue
Block a user