diff --git a/jest.config.js b/jest.config.mts similarity index 90% rename from jest.config.js rename to jest.config.mts index 7914d35b..63d829a4 100644 --- a/jest.config.js +++ b/jest.config.mts @@ -1,4 +1,4 @@ -module.exports = { +export default { preset: 'ts-jest', testEnvironment: 'node', moduleFileExtensions: ['ts', 'js', 'json', 'vue'], diff --git a/postcss.config.js b/postcss.config.mts similarity index 77% rename from postcss.config.js rename to postcss.config.mts index 12a703d9..2aa7205d 100644 --- a/postcss.config.js +++ b/postcss.config.mts @@ -1,4 +1,4 @@ -module.exports = { +export default { plugins: { tailwindcss: {}, autoprefixer: {}, diff --git a/src/test/ContactListItem.test.ts b/src/test/ContactListItem.test.ts index 773a6fc0..8a2c3f2a 100644 --- a/src/test/ContactListItem.test.ts +++ b/src/test/ContactListItem.test.ts @@ -179,7 +179,7 @@ describe("ContactListItem", () => { expect(wrapper.emitted("open-offer-dialog")).toBeTruthy(); // Test that both parameters are emitted correctly const emittedData = wrapper.emitted("open-offer-dialog")[0]; - expect(emittedData[0]).toEqual(["did:ethr:test:other", contact.name]); + expect(emittedData).toEqual(["did:ethr:test:other", contact.name]); }); }); diff --git a/src/vite.config.utils.js b/src/vite.config.utils.js deleted file mode 100644 index 719edfc7..00000000 --- a/src/vite.config.utils.js +++ /dev/null @@ -1,55 +0,0 @@ -import * as path from "path"; -import { promises as fs } from "fs"; -import { fileURLToPath } from "url"; - -export async function loadAppConfig() { - const packageJson = await loadPackageJson(); - const appName = process.env.TIME_SAFARI_APP_TITLE || packageJson.name; - const __dirname = path.dirname(fileURLToPath(import.meta.url)); - - return { - pwaConfig: { - manifest: { - name: appName, - short_name: appName, - icons: [ - { - src: "./img/icons/android-chrome-192x192.png", - sizes: "192x192", - type: "image/png", - }, - { - src: "./img/icons/android-chrome-512x512.png", - sizes: "512x512", - type: "image/png", - }, - { - src: "./img/icons/android-chrome-maskable-192x192.png", - sizes: "192x192", - type: "image/png", - purpose: "maskable", - }, - { - src: "./img/icons/android-chrome-maskable-512x512.png", - sizes: "512x512", - type: "image/png", - purpose: "maskable", - }, - ], - }, - }, - aliasConfig: { - "@": path.resolve(path.dirname(__dirname), "src"), - buffer: path.resolve(path.dirname(__dirname), "node_modules", "buffer"), - "dexie-export-import/dist/import": - "dexie-export-import/dist/import/index.js", - }, - }; -} - -async function loadPackageJson() { - const __dirname = path.dirname(fileURLToPath(import.meta.url)); - const packageJsonPath = path.resolve(path.dirname(__dirname), "package.json"); - const packageJsonData = await fs.readFile(packageJsonPath, "utf-8"); - return JSON.parse(packageJsonData); -} diff --git a/tailwind.config.js b/tailwind.config.mts similarity index 86% rename from tailwind.config.js rename to tailwind.config.mts index bfcdb5a2..702ff10d 100644 --- a/tailwind.config.js +++ b/tailwind.config.mts @@ -1,5 +1,5 @@ /** @type {import('tailwindcss').Config} */ -module.exports = { +export default { content: ["./src/**/*.vue"], theme: { extend: {},