From a68dd52c9ae5768fb08bbf8d25d517dae07ec738 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 14 Aug 2023 10:41:27 -0500 Subject: [PATCH] test: angular, react, and vue apps are tested on CI (#1795) --- .github/workflows/main.yml | 42 +++++++++++++++---- .../base/src/app/app.component.spec.ts | 14 +++---- .../official/blank/ionic.starter.json | 2 +- .../blank/src/app/home/home.page.spec.ts | 4 -- .../official/list/ionic.starter.json | 2 +- .../list/src/app/app.component.spec.ts | 11 ++--- .../official/sidemenu/ionic.starter.json | 2 +- .../sidemenu/src/app/app.component.spec.ts | 11 ++--- .../src/app/folder/folder.page.spec.ts | 11 ++--- .../official/tabs/ionic.starter.json | 2 +- .../explore-container.component.spec.ts | 2 - .../tabs/src/app/tab1/tab1.page.spec.ts | 4 -- .../tabs/src/app/tab2/tab2.page.spec.ts | 4 -- .../tabs/src/app/tab3/tab3.page.spec.ts | 4 -- .../tabs/src/app/tabs/tabs.page.spec.ts | 11 ++--- angular/official/blank/ionic.starter.json | 2 +- angular/official/list/ionic.starter.json | 2 +- angular/official/sidemenu/ionic.starter.json | 2 +- angular/official/tabs/ionic.starter.json | 2 +- react-vite/official/blank/ionic.starter.json | 2 +- react-vite/official/list/ionic.starter.json | 2 +- .../official/sidemenu/ionic.starter.json | 2 +- react-vite/official/tabs/ionic.starter.json | 2 +- react/official/blank/ionic.starter.json | 2 +- react/official/list/ionic.starter.json | 2 +- react/official/sidemenu/ionic.starter.json | 2 +- react/official/tabs/ionic.starter.json | 2 +- vue-vite/official/blank/ionic.starter.json | 2 +- vue-vite/official/list/ionic.starter.json | 2 +- vue-vite/official/sidemenu/ionic.starter.json | 2 +- vue-vite/official/tabs/ionic.starter.json | 2 +- vue/official/blank/ionic.starter.json | 2 +- vue/official/list/ionic.starter.json | 2 +- vue/official/sidemenu/ionic.starter.json | 2 +- vue/official/tabs/ionic.starter.json | 2 +- 35 files changed, 87 insertions(+), 79 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f6a4b45c0..432505849 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,12 +37,10 @@ jobs: test: strategy: matrix: - # We do not need to explicitly test vue-vite and react-vite - # because the test command finds apps that start with - # the framework string. As a result "vue" will map - # to both "vue" and "vue-vite" apps. Similarly, - # "react" will map to both "react" and "react-vite" apps. - framework: ['vue', 'react'] + # We explicitly list each test app so they can + # be built in parallel rather than only specifying + # "vue" which would cause several projects to be built sequentially. + framework: ['vue-vite-official-blank', 'vue-vite-official-list', 'vue-vite-official-tabs', 'vue-vite-official-sidemenu', 'vue-official-blank', 'vue-official-list', 'vue-official-tabs', 'vue-official-sidemenu', 'react-vite-official-blank', 'react-vite-official-list', 'react-vite-official-tabs', 'react-vite-official-sidemenu', 'react-official-blank', 'react-official-list', 'react-official-tabs', 'react-official-sidemenu', 'angular-standalone-official-blank', 'angular-standalone-official-list', 'angular-standalone-official-tabs', 'angular-standalone-official-sidemenu', 'angular-official-blank', 'angular-official-list', 'angular-official-tabs', 'angular-official-sidemenu'] runs-on: ubuntu-latest needs: build @@ -61,15 +59,28 @@ jobs: node-version: 16 cache: npm cache-dependency-path: | - build/${{ matrix.framework }}-*/ionic.starter.json - build/${{ matrix.framework }}-*/package.json + build/${{ matrix.framework }}/ionic.starter.json + build/${{ matrix.framework }}/package.json - name: Test ${{ matrix.framework }} run: | npm install rm -rf node_modules/@types npm run starters:test -- --type=${{ matrix.framework }} - + + # This step allows us to have a required + # status check for each matrix job without having + # to manually add each matrix run in the branch protection rules. + # Source: https://github.community/t/status-check-for-a-matrix-jobs/127354 + verify-test: + if: ${{ always() }} + needs: test + runs-on: ubuntu-latest + steps: + - name: Check build matrix status + if: ${{ needs.test.result != 'success' }} + run: exit 1 + test-legacy: strategy: matrix: @@ -102,6 +113,19 @@ jobs: npm install rm -rf node_modules/@types npm run starters:test -- --type=${{ matrix.framework }} + + # This step allows us to have a required + # status check for each matrix job without having + # to manually add each matrix run in the branch protection rules. + # Source: https://github.community/t/status-check-for-a-matrix-jobs/127354 + verify-test-legacy: + if: ${{ always() }} + needs: test-legacy + runs-on: ubuntu-latest + steps: + - name: Check build matrix status + if: ${{ needs.test-legacy.result != 'success' }} + run: exit 1 deploy: runs-on: ubuntu-latest diff --git a/angular-standalone/base/src/app/app.component.spec.ts b/angular-standalone/base/src/app/app.component.spec.ts index 8e9dc64d3..224462e5f 100644 --- a/angular-standalone/base/src/app/app.component.spec.ts +++ b/angular-standalone/base/src/app/app.component.spec.ts @@ -1,16 +1,14 @@ import { TestBed } from '@angular/core/testing'; -import { provideRouter } from '@angular/router'; +import { RouterTestingModule } from '@angular/router/testing'; import { AppComponent } from './app.component'; describe('AppComponent', () => { - beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [AppComponent], - providers: [provideRouter([])], - }).compileComponents(); - }); - it('should create the app', () => { + TestBed.overrideComponent(AppComponent, { + add: { + imports: [RouterTestingModule] + } + }); const fixture = TestBed.createComponent(AppComponent); const app = fixture.componentInstance; expect(app).toBeTruthy(); diff --git a/angular-standalone/official/blank/ionic.starter.json b/angular-standalone/official/blank/ionic.starter.json index 118035353..e28c7e4ac 100644 --- a/angular-standalone/official/blank/ionic.starter.json +++ b/angular-standalone/official/blank/ionic.starter.json @@ -7,6 +7,6 @@ "www" ], "scripts": { - "test": "npm run lint && npm run ng -- build --configuration=ci && npm run ng -- build --configuration=production --progress=false && npm run ng -- test --configuration=ci && npm run ng -- e2e --configuration=ci && npm run ng -- g pg my-page --dry-run && npm run ng -- g c my-component --dry-run" + "test": "npm run lint && npm run build && npm run test -- --configuration=ci --browsers=ChromeHeadless" } } diff --git a/angular-standalone/official/blank/src/app/home/home.page.spec.ts b/angular-standalone/official/blank/src/app/home/home.page.spec.ts index 431bbd4f1..fe8f195bc 100644 --- a/angular-standalone/official/blank/src/app/home/home.page.spec.ts +++ b/angular-standalone/official/blank/src/app/home/home.page.spec.ts @@ -7,10 +7,6 @@ describe('HomePage', () => { let fixture: ComponentFixture; beforeEach(async () => { - await TestBed - .configureTestingModule() - .compileComponents(); - fixture = TestBed.createComponent(HomePage); component = fixture.componentInstance; fixture.detectChanges(); diff --git a/angular-standalone/official/list/ionic.starter.json b/angular-standalone/official/list/ionic.starter.json index dcf238035..9e35de2ef 100644 --- a/angular-standalone/official/list/ionic.starter.json +++ b/angular-standalone/official/list/ionic.starter.json @@ -7,6 +7,6 @@ "www" ], "scripts": { - "test": "npm run lint && npm run ng -- build --configuration=ci && npm run ng -- build --configuration=production --progress=false && npm run ng -- test --configuration=ci && npm run ng -- e2e --configuration=ci && npm run ng -- g pg my-page --dry-run && npm run ng -- g c my-component --dry-run" + "test": "npm run lint && npm run build && npm run test -- --configuration=ci --browsers=ChromeHeadless" } } diff --git a/angular-standalone/official/list/src/app/app.component.spec.ts b/angular-standalone/official/list/src/app/app.component.spec.ts index d56420e0e..6edde74a2 100644 --- a/angular-standalone/official/list/src/app/app.component.spec.ts +++ b/angular-standalone/official/list/src/app/app.component.spec.ts @@ -1,5 +1,5 @@ import { TestBed } from '@angular/core/testing'; -import { provideRouter } from '@angular/router'; +import { RouterTestingModule } from '@angular/router/testing'; import { IonicModule } from '@ionic/angular'; import { AppComponent } from './app.component'; @@ -7,10 +7,11 @@ import { AppComponent } from './app.component'; describe('AppComponent', () => { beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [AppComponent, IonicModule], - providers: [provideRouter([])] - }).compileComponents(); + TestBed.overrideComponent(AppComponent, { + add: { + imports: [RouterTestingModule] + } + }); }); it('should create the app', () => { diff --git a/angular-standalone/official/sidemenu/ionic.starter.json b/angular-standalone/official/sidemenu/ionic.starter.json index 3bbd0b676..dee32cee3 100644 --- a/angular-standalone/official/sidemenu/ionic.starter.json +++ b/angular-standalone/official/sidemenu/ionic.starter.json @@ -7,6 +7,6 @@ "www" ], "scripts": { - "test": "npm run lint && npm run ng -- build --configuration=ci && npm run ng -- build --configuration=production --progress=false && npm run ng -- test --configuration=ci && npm run ng -- e2e --configuration=ci && npm run ng -- g pg my-page --dry-run && npm run ng -- g c my-component --dry-run" + "test": "npm run lint && npm run build && npm run test -- --configuration=ci --browsers=ChromeHeadless" } } diff --git a/angular-standalone/official/sidemenu/src/app/app.component.spec.ts b/angular-standalone/official/sidemenu/src/app/app.component.spec.ts index ac0b042d1..98f1be72a 100644 --- a/angular-standalone/official/sidemenu/src/app/app.component.spec.ts +++ b/angular-standalone/official/sidemenu/src/app/app.component.spec.ts @@ -1,14 +1,15 @@ import { TestBed } from '@angular/core/testing'; -import { provideRouter } from '@angular/router'; +import { RouterTestingModule } from '@angular/router/testing'; import { AppComponent } from './app.component'; describe('AppComponent', () => { beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [AppComponent], - providers: [provideRouter([])], - }).compileComponents(); + TestBed.overrideComponent(AppComponent, { + add: { + imports: [RouterTestingModule] + } + }); }); it('should create the app', () => { diff --git a/angular-standalone/official/sidemenu/src/app/folder/folder.page.spec.ts b/angular-standalone/official/sidemenu/src/app/folder/folder.page.spec.ts index ea1c2e20b..4c3d8572c 100644 --- a/angular-standalone/official/sidemenu/src/app/folder/folder.page.spec.ts +++ b/angular-standalone/official/sidemenu/src/app/folder/folder.page.spec.ts @@ -1,5 +1,5 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { provideRouter } from '@angular/router'; +import { RouterTestingModule } from '@angular/router/testing'; import { IonicModule } from '@ionic/angular'; import { FolderPage } from './folder.page'; @@ -9,10 +9,11 @@ describe('FolderPage', () => { let fixture: ComponentFixture; beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [FolderPage, IonicModule], - providers: [provideRouter([])], - }).compileComponents(); + TestBed.overrideComponent(FolderPage, { + add: { + imports: [RouterTestingModule] + } + }); fixture = TestBed.createComponent(FolderPage); component = fixture.componentInstance; diff --git a/angular-standalone/official/tabs/ionic.starter.json b/angular-standalone/official/tabs/ionic.starter.json index c233f6c30..3c68e48ac 100644 --- a/angular-standalone/official/tabs/ionic.starter.json +++ b/angular-standalone/official/tabs/ionic.starter.json @@ -7,6 +7,6 @@ "www" ], "scripts": { - "test": "npm run lint && npm run ng -- build --configuration=ci && npm run ng -- build --configuration=production --progress=false && npm run ng -- test --configuration=ci && npm run ng -- e2e --configuration=ci && npm run ng -- g pg my-page --dry-run && npm run ng -- g c my-component --dry-run" + "test": "npm run lint && npm run build && npm run test -- --configuration=ci --browsers=ChromeHeadless" } } diff --git a/angular-standalone/official/tabs/src/app/explore-container/explore-container.component.spec.ts b/angular-standalone/official/tabs/src/app/explore-container/explore-container.component.spec.ts index 55e82dd27..aa956d9b9 100644 --- a/angular-standalone/official/tabs/src/app/explore-container/explore-container.component.spec.ts +++ b/angular-standalone/official/tabs/src/app/explore-container/explore-container.component.spec.ts @@ -7,8 +7,6 @@ describe('ExploreContainerComponent', () => { let fixture: ComponentFixture; beforeEach(async () => { - await TestBed.configureTestingModule().compileComponents(); - fixture = TestBed.createComponent(ExploreContainerComponent); component = fixture.componentInstance; fixture.detectChanges(); diff --git a/angular-standalone/official/tabs/src/app/tab1/tab1.page.spec.ts b/angular-standalone/official/tabs/src/app/tab1/tab1.page.spec.ts index 879b23a37..fcc00f940 100644 --- a/angular-standalone/official/tabs/src/app/tab1/tab1.page.spec.ts +++ b/angular-standalone/official/tabs/src/app/tab1/tab1.page.spec.ts @@ -7,10 +7,6 @@ describe('Tab1Page', () => { let fixture: ComponentFixture; beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [Tab1Page], - }).compileComponents(); - fixture = TestBed.createComponent(Tab1Page); component = fixture.componentInstance; fixture.detectChanges(); diff --git a/angular-standalone/official/tabs/src/app/tab2/tab2.page.spec.ts b/angular-standalone/official/tabs/src/app/tab2/tab2.page.spec.ts index a69be2a3e..92c0cac4a 100644 --- a/angular-standalone/official/tabs/src/app/tab2/tab2.page.spec.ts +++ b/angular-standalone/official/tabs/src/app/tab2/tab2.page.spec.ts @@ -7,10 +7,6 @@ describe('Tab2Page', () => { let fixture: ComponentFixture; beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [Tab2Page], - }).compileComponents(); - fixture = TestBed.createComponent(Tab2Page); component = fixture.componentInstance; fixture.detectChanges(); diff --git a/angular-standalone/official/tabs/src/app/tab3/tab3.page.spec.ts b/angular-standalone/official/tabs/src/app/tab3/tab3.page.spec.ts index dcab024d1..a03da9934 100644 --- a/angular-standalone/official/tabs/src/app/tab3/tab3.page.spec.ts +++ b/angular-standalone/official/tabs/src/app/tab3/tab3.page.spec.ts @@ -7,10 +7,6 @@ describe('Tab3Page', () => { let fixture: ComponentFixture; beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [Tab3Page], - }).compileComponents(); - fixture = TestBed.createComponent(Tab3Page); component = fixture.componentInstance; fixture.detectChanges(); diff --git a/angular-standalone/official/tabs/src/app/tabs/tabs.page.spec.ts b/angular-standalone/official/tabs/src/app/tabs/tabs.page.spec.ts index d0be099f1..5e44b104f 100644 --- a/angular-standalone/official/tabs/src/app/tabs/tabs.page.spec.ts +++ b/angular-standalone/official/tabs/src/app/tabs/tabs.page.spec.ts @@ -1,5 +1,5 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { provideRouter } from '@angular/router'; +import { RouterTestingModule } from '@angular/router/testing'; import { TabsPage } from './tabs.page'; @@ -8,10 +8,11 @@ describe('TabsPage', () => { let fixture: ComponentFixture; beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [TabsPage], - providers: [provideRouter([])], - }).compileComponents(); + TestBed.overrideComponent(TabsPage, { + add: { + imports: [RouterTestingModule] + } + }); }); beforeEach(() => { diff --git a/angular/official/blank/ionic.starter.json b/angular/official/blank/ionic.starter.json index 118035353..e28c7e4ac 100644 --- a/angular/official/blank/ionic.starter.json +++ b/angular/official/blank/ionic.starter.json @@ -7,6 +7,6 @@ "www" ], "scripts": { - "test": "npm run lint && npm run ng -- build --configuration=ci && npm run ng -- build --configuration=production --progress=false && npm run ng -- test --configuration=ci && npm run ng -- e2e --configuration=ci && npm run ng -- g pg my-page --dry-run && npm run ng -- g c my-component --dry-run" + "test": "npm run lint && npm run build && npm run test -- --configuration=ci --browsers=ChromeHeadless" } } diff --git a/angular/official/list/ionic.starter.json b/angular/official/list/ionic.starter.json index dcf238035..9e35de2ef 100644 --- a/angular/official/list/ionic.starter.json +++ b/angular/official/list/ionic.starter.json @@ -7,6 +7,6 @@ "www" ], "scripts": { - "test": "npm run lint && npm run ng -- build --configuration=ci && npm run ng -- build --configuration=production --progress=false && npm run ng -- test --configuration=ci && npm run ng -- e2e --configuration=ci && npm run ng -- g pg my-page --dry-run && npm run ng -- g c my-component --dry-run" + "test": "npm run lint && npm run build && npm run test -- --configuration=ci --browsers=ChromeHeadless" } } diff --git a/angular/official/sidemenu/ionic.starter.json b/angular/official/sidemenu/ionic.starter.json index 3bbd0b676..dee32cee3 100644 --- a/angular/official/sidemenu/ionic.starter.json +++ b/angular/official/sidemenu/ionic.starter.json @@ -7,6 +7,6 @@ "www" ], "scripts": { - "test": "npm run lint && npm run ng -- build --configuration=ci && npm run ng -- build --configuration=production --progress=false && npm run ng -- test --configuration=ci && npm run ng -- e2e --configuration=ci && npm run ng -- g pg my-page --dry-run && npm run ng -- g c my-component --dry-run" + "test": "npm run lint && npm run build && npm run test -- --configuration=ci --browsers=ChromeHeadless" } } diff --git a/angular/official/tabs/ionic.starter.json b/angular/official/tabs/ionic.starter.json index c233f6c30..3c68e48ac 100644 --- a/angular/official/tabs/ionic.starter.json +++ b/angular/official/tabs/ionic.starter.json @@ -7,6 +7,6 @@ "www" ], "scripts": { - "test": "npm run lint && npm run ng -- build --configuration=ci && npm run ng -- build --configuration=production --progress=false && npm run ng -- test --configuration=ci && npm run ng -- e2e --configuration=ci && npm run ng -- g pg my-page --dry-run && npm run ng -- g c my-component --dry-run" + "test": "npm run lint && npm run build && npm run test -- --configuration=ci --browsers=ChromeHeadless" } } diff --git a/react-vite/official/blank/ionic.starter.json b/react-vite/official/blank/ionic.starter.json index 8bb1b341d..5a4c10616 100644 --- a/react-vite/official/blank/ionic.starter.json +++ b/react-vite/official/blank/ionic.starter.json @@ -7,6 +7,6 @@ "www" ], "scripts": { - "test": "npm run build" + "test": "npm run build && npm run test.unit -- --watch=false && npm i --no-save concurrently && ./node_modules/.bin/concurrently \"npm run dev\" \"npm run test.e2e\" --kill-others --success first" } } diff --git a/react-vite/official/list/ionic.starter.json b/react-vite/official/list/ionic.starter.json index 103f876d6..9e20d66ba 100644 --- a/react-vite/official/list/ionic.starter.json +++ b/react-vite/official/list/ionic.starter.json @@ -7,6 +7,6 @@ "www" ], "scripts": { - "test": "npm run build" + "test": "npm run build && npm run test.unit -- --watch=false && npm i --no-save concurrently && ./node_modules/.bin/concurrently \"npm run dev\" \"npm run test.e2e\" --kill-others --success first" } } diff --git a/react-vite/official/sidemenu/ionic.starter.json b/react-vite/official/sidemenu/ionic.starter.json index 3d9918a01..0ca129de2 100644 --- a/react-vite/official/sidemenu/ionic.starter.json +++ b/react-vite/official/sidemenu/ionic.starter.json @@ -7,6 +7,6 @@ "www" ], "scripts": { - "test": "npm run build" + "test": "npm run build && npm run test.unit -- --watch=false && npm i --no-save concurrently && ./node_modules/.bin/concurrently \"npm run dev\" \"npm run test.e2e\" --kill-others --success first" } } diff --git a/react-vite/official/tabs/ionic.starter.json b/react-vite/official/tabs/ionic.starter.json index 3bbd94562..b5ad2db75 100644 --- a/react-vite/official/tabs/ionic.starter.json +++ b/react-vite/official/tabs/ionic.starter.json @@ -7,6 +7,6 @@ "www" ], "scripts": { - "test": "npm run build" + "test": "npm run build && npm run test.unit -- --watch=false && npm i --no-save concurrently && ./node_modules/.bin/concurrently \"npm run dev\" \"npm run test.e2e\" --kill-others --success first" } } diff --git a/react/official/blank/ionic.starter.json b/react/official/blank/ionic.starter.json index 8bb1b341d..cf18eee4e 100644 --- a/react/official/blank/ionic.starter.json +++ b/react/official/blank/ionic.starter.json @@ -7,6 +7,6 @@ "www" ], "scripts": { - "test": "npm run build" + "test": "npm run build && npm run test -- --watchAll=false" } } diff --git a/react/official/list/ionic.starter.json b/react/official/list/ionic.starter.json index 103f876d6..5794c4394 100644 --- a/react/official/list/ionic.starter.json +++ b/react/official/list/ionic.starter.json @@ -7,6 +7,6 @@ "www" ], "scripts": { - "test": "npm run build" + "test": "npm run build && npm run test -- --watchAll=false" } } diff --git a/react/official/sidemenu/ionic.starter.json b/react/official/sidemenu/ionic.starter.json index 3d9918a01..075b75ba1 100644 --- a/react/official/sidemenu/ionic.starter.json +++ b/react/official/sidemenu/ionic.starter.json @@ -7,6 +7,6 @@ "www" ], "scripts": { - "test": "npm run build" + "test": "npm run build && npm run test -- --watchAll=false" } } diff --git a/react/official/tabs/ionic.starter.json b/react/official/tabs/ionic.starter.json index 3bbd94562..1e5c39b6a 100644 --- a/react/official/tabs/ionic.starter.json +++ b/react/official/tabs/ionic.starter.json @@ -7,6 +7,6 @@ "www" ], "scripts": { - "test": "npm run build" + "test": "npm run build && npm run test -- --watchAll=false" } } diff --git a/vue-vite/official/blank/ionic.starter.json b/vue-vite/official/blank/ionic.starter.json index 8bb1b341d..d0f5f51d2 100644 --- a/vue-vite/official/blank/ionic.starter.json +++ b/vue-vite/official/blank/ionic.starter.json @@ -7,6 +7,6 @@ "www" ], "scripts": { - "test": "npm run build" + "test": "npm run build && npm run test:unit -- --watch=false && npm i --no-save concurrently && ./node_modules/.bin/concurrently \"npm run dev\" \"npm run test:e2e\" --kill-others --success first" } } diff --git a/vue-vite/official/list/ionic.starter.json b/vue-vite/official/list/ionic.starter.json index 103f876d6..7f053573f 100644 --- a/vue-vite/official/list/ionic.starter.json +++ b/vue-vite/official/list/ionic.starter.json @@ -7,6 +7,6 @@ "www" ], "scripts": { - "test": "npm run build" + "test": "npm run build && npm run test:unit -- --watch=false && npm i --no-save concurrently && ./node_modules/.bin/concurrently \"npm run dev\" \"npm run test:e2e\" --kill-others --success first" } } diff --git a/vue-vite/official/sidemenu/ionic.starter.json b/vue-vite/official/sidemenu/ionic.starter.json index 3d9918a01..03aac50c5 100644 --- a/vue-vite/official/sidemenu/ionic.starter.json +++ b/vue-vite/official/sidemenu/ionic.starter.json @@ -7,6 +7,6 @@ "www" ], "scripts": { - "test": "npm run build" + "test": "npm run build && npm run test:unit -- --watch=false && npm i --no-save concurrently && ./node_modules/.bin/concurrently \"npm run dev\" \"npm run test:e2e\" --kill-others --success first" } } diff --git a/vue-vite/official/tabs/ionic.starter.json b/vue-vite/official/tabs/ionic.starter.json index 3bbd94562..f1a8c9dd5 100644 --- a/vue-vite/official/tabs/ionic.starter.json +++ b/vue-vite/official/tabs/ionic.starter.json @@ -7,6 +7,6 @@ "www" ], "scripts": { - "test": "npm run build" + "test": "npm run build && npm run test:unit -- --watch=false && npm i --no-save concurrently && ./node_modules/.bin/concurrently \"npm run dev\" \"npm run test:e2e\" --kill-others --success first" } } diff --git a/vue/official/blank/ionic.starter.json b/vue/official/blank/ionic.starter.json index 8bb1b341d..ad11ef36c 100644 --- a/vue/official/blank/ionic.starter.json +++ b/vue/official/blank/ionic.starter.json @@ -7,6 +7,6 @@ "www" ], "scripts": { - "test": "npm run build" + "test": "npm run build && npm run test:unit" } } diff --git a/vue/official/list/ionic.starter.json b/vue/official/list/ionic.starter.json index 103f876d6..505152fe8 100644 --- a/vue/official/list/ionic.starter.json +++ b/vue/official/list/ionic.starter.json @@ -7,6 +7,6 @@ "www" ], "scripts": { - "test": "npm run build" + "test": "npm run build && npm run test:unit" } } diff --git a/vue/official/sidemenu/ionic.starter.json b/vue/official/sidemenu/ionic.starter.json index 3d9918a01..64266cb88 100644 --- a/vue/official/sidemenu/ionic.starter.json +++ b/vue/official/sidemenu/ionic.starter.json @@ -7,6 +7,6 @@ "www" ], "scripts": { - "test": "npm run build" + "test": "npm run build && npm run test:unit" } } diff --git a/vue/official/tabs/ionic.starter.json b/vue/official/tabs/ionic.starter.json index 3bbd94562..e0c4725ec 100644 --- a/vue/official/tabs/ionic.starter.json +++ b/vue/official/tabs/ionic.starter.json @@ -7,6 +7,6 @@ "www" ], "scripts": { - "test": "npm run build" + "test": "npm run build && npm run test:unit" } }