diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5a9c6fc..0538ade 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -71,6 +71,9 @@ jobs: - name: Build run: pnpm build + - name: Run tests + run: pnpm script:unit-test + - name: De-symlink run: rsync .store/rt/ rt_dist/ -a --copy-links - name: Upload artifact diff --git a/scripts/unit-test.ts b/scripts/unit-test.ts index e623c31..a35202a 100644 --- a/scripts/unit-test.ts +++ b/scripts/unit-test.ts @@ -1,3 +1,7 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + import { argv, exit } from 'node:process' import { App } from '@tinyhttp/app' import { type ExecaChildProcess, execa } from 'execa' diff --git a/src/content/shared/types/Optional.ts b/src/content/shared/types/Optional.ts index b7e0a1d..e003224 100644 --- a/src/content/shared/types/Optional.ts +++ b/src/content/shared/types/Optional.ts @@ -1,4 +1,3 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - diff --git a/src/content/tests/manager.ts b/src/content/tests/manager.ts index b4e1640..fe0e970 100644 --- a/src/content/tests/manager.ts +++ b/src/content/tests/manager.ts @@ -1,3 +1,7 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + import { hold, report, createTAPReporter } from 'zora' const TEST_PORT = 3948 diff --git a/src/content/tests/shared/index.ts b/src/content/tests/shared/index.ts index f5d0384..e334956 100644 --- a/src/content/tests/shared/index.ts +++ b/src/content/tests/shared/index.ts @@ -1,3 +1,7 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + import search from './search' export default async function () { diff --git a/src/content/tests/shared/search/index.ts b/src/content/tests/shared/search/index.ts index 2eb870c..624b7e4 100644 --- a/src/content/tests/shared/search/index.ts +++ b/src/content/tests/shared/search/index.ts @@ -1,3 +1,7 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + import providers from './providers' export default async function () { diff --git a/src/content/tests/shared/search/providers/URLProvider.ts b/src/content/tests/shared/search/providers/URLProvider.ts index 7cf8df9..19c3dc7 100644 --- a/src/content/tests/shared/search/providers/URLProvider.ts +++ b/src/content/tests/shared/search/providers/URLProvider.ts @@ -1,3 +1,7 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + import { test } from 'zora' import { URLProvider } from '@shared/search/providers/URLProvider' diff --git a/src/content/tests/shared/search/providers/index.ts b/src/content/tests/shared/search/providers/index.ts index 84f4555..8e1e1a2 100644 --- a/src/content/tests/shared/search/providers/index.ts +++ b/src/content/tests/shared/search/providers/index.ts @@ -1,3 +1,7 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + import URLProvider from './URLProvider' export default async function () { diff --git a/src/content/tests/tests.ts b/src/content/tests/tests.ts index 4fc48d7..af2b006 100644 --- a/src/content/tests/tests.ts +++ b/src/content/tests/tests.ts @@ -1,3 +1,7 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + import { test } from 'zora' import { manageTests } from './manager' diff --git a/tsconfig.json b/tsconfig.json index 87b7d99..60550ba 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,16 +4,9 @@ "target": "es2022", "allowArbitraryExtensions": true, "paths": { - "@shared/*": [ - "./src/content/shared/*" - ] + "@shared/*": ["./src/content/shared/*"] } }, - "include": [ - "src/content/**/*" - ], - "exclude": [ - "node_modules/*", - "public/*" - ] -} \ No newline at end of file + "include": ["src/content/**/*"], + "exclude": ["node_modules/*", "public/*"] +}