Add app tests to yarn test
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
{
|
{
|
||||||
"language": "en",
|
"language": "en",
|
||||||
"words": [
|
"words": [
|
||||||
|
"Bbreak",
|
||||||
|
"nodered",
|
||||||
"goog",
|
"goog",
|
||||||
"thomasnordquist",
|
"thomasnordquist",
|
||||||
"nowrap",
|
"nowrap",
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export class ConfigMigrator {
|
|||||||
|
|
||||||
public applyMigrations(subject: MigrationSubject): Partial<MigrationSubject> {
|
public applyMigrations(subject: MigrationSubject): Partial<MigrationSubject> {
|
||||||
while (this.isMigrationNecessary(subject)) {
|
while (this.isMigrationNecessary(subject)) {
|
||||||
subject = this.applyableMigrations(subject)
|
subject = this.applicableMigrations(subject)
|
||||||
.filter(migration => migration.from === subject.configVersion)
|
.filter(migration => migration.from === subject.configVersion)
|
||||||
.reduce((currentSubject, migration) => migration.apply(currentSubject as any), subject)
|
.reduce((currentSubject, migration) => migration.apply(currentSubject as any), subject)
|
||||||
}
|
}
|
||||||
@@ -25,10 +25,10 @@ export class ConfigMigrator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public isMigrationNecessary(subject: MigrationSubject): boolean {
|
public isMigrationNecessary(subject: MigrationSubject): boolean {
|
||||||
return this.applyableMigrations(subject).length > 0
|
return this.applicableMigrations(subject).length > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
private applyableMigrations(subject: MigrationSubject): Migration[] {
|
private applicableMigrations(subject: MigrationSubject): Migration[] {
|
||||||
return this.migrations.filter(migration => migration.from === subject.configVersion)
|
return this.migrations.filter(migration => migration.from === subject.configVersion)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,9 @@
|
|||||||
"main": "dist/src/electron.js",
|
"main": "dist/src/electron.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "electron .",
|
"start": "electron .",
|
||||||
"test": "yarn run test-backend",
|
"test": "yarn test:app && yarn test:backend",
|
||||||
|
"test:app": "cd app && yarn test",
|
||||||
|
"test:backend": "cd backend && yarn test",
|
||||||
"install": "cd app && yarn && cd ..",
|
"install": "cd app && yarn && cd ..",
|
||||||
"dev": "npm-run-all --parallel dev:*",
|
"dev": "npm-run-all --parallel dev:*",
|
||||||
"dev:app": "cd app && npm run dev",
|
"dev:app": "cd app && npm run dev",
|
||||||
@@ -15,7 +17,6 @@
|
|||||||
"lint:tslint": "tslint -p ./",
|
"lint:tslint": "tslint -p ./",
|
||||||
"lint:spellcheck": "cspell -e ./build -e \"node_modules\" \"**/*.ts{x,}\"",
|
"lint:spellcheck": "cspell -e ./build -e \"node_modules\" \"**/*.ts{x,}\"",
|
||||||
"build": "tsc && cd app && yarn run build && cd ..",
|
"build": "tsc && cd app && yarn run build && cd ..",
|
||||||
"test-backend": "cd backend && yarn run test && cd ..",
|
|
||||||
"prepare-release": "ts-node scripts/prepare-release.ts",
|
"prepare-release": "ts-node scripts/prepare-release.ts",
|
||||||
"package": "ts-node package.ts",
|
"package": "ts-node package.ts",
|
||||||
"ui-test": "./scripts/uiTests.sh",
|
"ui-test": "./scripts/uiTests.sh",
|
||||||
|
|||||||
Reference in New Issue
Block a user