chore(setup): fix running unit tests in all packages

This commit is contained in:
Karol Sójko 2022-08-23 13:40:21 +02:00
parent 7bff3dee24
commit d2cebf930a
No known key found for this signature in database
GPG Key ID: A50543BF560BDEB0
15 changed files with 30 additions and 22 deletions

View File

@ -22,7 +22,7 @@
"prebuild": "yarn clean",
"build": "tsc -p tsconfig.json",
"lint": "eslint . --ext .ts",
"test:unit": "jest spec --coverage"
"test": "jest spec --coverage"
},
"devDependencies": {
"@types/jest": "^28.1.5",

View File

@ -22,7 +22,7 @@
"prebuild": "yarn clean",
"build": "tsc -p tsconfig.json",
"lint": "eslint . --ext .ts",
"test:unit": "jest"
"test": "jest"
},
"dependencies": {
"@standardnotes/auth": "^3.19.4",

View File

@ -20,7 +20,7 @@
"prebuild": "yarn clean",
"build": "tsc -p tsconfig.json",
"lint": "eslint . --ext .ts",
"test:unit": "jest"
"test": "jest"
},
"devDependencies": {
"@types/jest": "^28.1.5",

View File

@ -20,7 +20,7 @@
"prebuild": "yarn clean",
"build": "tsc -p tsconfig.json",
"lint": "eslint . --ext .ts",
"test:unit": "jest"
"test": "jest"
},
"devDependencies": {
"@types/jest": "^28.1.5",

View File

@ -20,7 +20,7 @@
"prebuild": "yarn clean",
"build": "tsc -p tsconfig.json",
"lint": "eslint . --ext .ts",
"test:unit": "jest"
"test": "jest"
},
"devDependencies": {
"@types/jest": "^28.1.5",

View File

@ -21,7 +21,7 @@
"prebuild": "yarn clean",
"build": "tsc -p tsconfig.json",
"lint": "eslint . --ext .ts",
"test:unit": "jest spec --coverage --passWithNoTests"
"test": "jest spec --coverage --passWithNoTests"
},
"devDependencies": {
"@types/jest": "^28.1.5",

View File

@ -7,5 +7,13 @@ module.exports = {
'ts-jest': {
tsconfig: 'tsconfig.json',
},
},
coverageThreshold: {
global: {
branches: 9,
functions: 9,
lines: 16,
statements: 16
}
}
};

View File

@ -20,7 +20,7 @@
"prebuild": "yarn clean",
"build": "tsc -p tsconfig.json",
"lint": "eslint . --ext .ts",
"test:unit": "jest spec --coverage"
"test": "jest spec --coverage"
},
"dependencies": {
"@standardnotes/auth": "^3.19.4",

View File

@ -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 { FileItem } from '@standardnotes/models'
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', () => {
let apiService: ApiServiceInterface
let itemManager: ItemManagerInterface

View File

@ -21,7 +21,7 @@
"build": "tsc -p tsconfig.json",
"watch": "tsc -p tsconfig.json --watch",
"lint": "eslint . --ext .ts",
"test:unit": "yarn lint"
"test": "yarn lint"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.30.0",

View File

@ -58,5 +58,5 @@ yarn start:server:e2e
From the root of the repository, run:
```
yarn run test:unit
yarn run test
```

View File

@ -31,7 +31,7 @@ module.exports = {
branches: 13,
functions: 22,
lines: 27,
statements: 28,
statements: 27,
},
},
}

View File

@ -25,7 +25,7 @@
"lint": "yarn lint:tsc && yarn lint:eslint",
"lint:eslint": "eslint --ext .ts lib/",
"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"
},
"devDependencies": {

View File

@ -20,7 +20,7 @@
"prebuild": "yarn clean",
"build": "tsc -p tsconfig.json",
"lint": "eslint . --ext .ts",
"test:unit": "jest spec --coverage"
"test": "jest spec --coverage --passWithNoTests"
},
"dependencies": {
"@standardnotes/common": "^1.30.0",

View File

@ -22,7 +22,7 @@
"prebuild": "yarn clean",
"build": "tsc -p tsconfig.json",
"lint": "eslint . --ext .ts",
"test:unit": "jest spec"
"test": "jest spec"
},
"dependencies": {
"@standardnotes/common": "^1.23.1",