diff --git a/packages/web-components/test/display/display.test.js b/packages/web-components/test/display/display.test.js index bb8428b..24de81e 100644 --- a/packages/web-components/test/display/display.test.js +++ b/packages/web-components/test/display/display.test.js @@ -1,7 +1,7 @@ // @ts-check import '../installSesLockdown.js'; import { expect, test } from 'vitest'; -import { parseAsValue } from '../../src/display/display.js'; +import { parseAsValue } from '../../src/display/display.ts'; test(parseAsValue, () => { expect(parseAsValue('30')).toBe(30n); diff --git a/packages/web-components/test/display/natValue/captureNum.test.js b/packages/web-components/test/display/natValue/captureNum.test.js index eefa082..d20fa40 100644 --- a/packages/web-components/test/display/natValue/captureNum.test.js +++ b/packages/web-components/test/display/natValue/captureNum.test.js @@ -1,7 +1,7 @@ // @ts-check import '../../installSesLockdown.js'; import { describe, expect, it } from 'vitest'; -import { captureNum } from '../../../src/display/natValue/helpers/captureNum.js'; +import { captureNum } from '../../../src/display/natValue/helpers/captureNum.ts'; describe(captureNum, () => { it('can capture positive numbers', () => { diff --git a/packages/web-components/test/display/natValue/parseAsNat.test.js b/packages/web-components/test/display/natValue/parseAsNat.test.js index 83cc630..c12e953 100644 --- a/packages/web-components/test/display/natValue/parseAsNat.test.js +++ b/packages/web-components/test/display/natValue/parseAsNat.test.js @@ -1,7 +1,7 @@ // @ts-check import '../../installSesLockdown.js'; import { describe, expect, it } from 'vitest'; -import { parseAsNat } from '../../../src/display/natValue/parseAsNat.js'; +import { parseAsNat } from '../../../src/display/natValue/parseAsNat.ts'; describe(parseAsNat, () => { it('can parse cents to dollars', () => { diff --git a/packages/web-components/test/display/natValue/roundToDecimalPlaces.test.js b/packages/web-components/test/display/natValue/roundToDecimalPlaces.test.js index 4c2ce05..ca4e69d 100644 --- a/packages/web-components/test/display/natValue/roundToDecimalPlaces.test.js +++ b/packages/web-components/test/display/natValue/roundToDecimalPlaces.test.js @@ -1,7 +1,7 @@ // @ts-check import '../../installSesLockdown.js'; import { describe, expect, it } from 'vitest'; -import { roundToDecimalPlaces as round } from '../../../src/display/natValue/helpers/roundToDecimalPlaces.js'; +import { roundToDecimalPlaces as round } from '../../../src/display/natValue/helpers/roundToDecimalPlaces.ts'; describe(round, () => { it('can round', () => { diff --git a/packages/web-components/test/display/natValue/stringifyNat.test.js b/packages/web-components/test/display/natValue/stringifyNat.test.js index 6aa39de..c87783e 100644 --- a/packages/web-components/test/display/natValue/stringifyNat.test.js +++ b/packages/web-components/test/display/natValue/stringifyNat.test.js @@ -1,7 +1,7 @@ // @ts-check import '../../installSesLockdown.js'; import { describe, expect, it } from 'vitest'; -import { stringifyNat } from '../../../src/display/natValue/stringifyNat.js'; +import { stringifyNat } from '../../../src/display/natValue/stringifyNat.ts'; describe(stringifyNat, () => { it('can stringify cents to dollars', () => { diff --git a/packages/web-components/test/display/natValue/stringifyRatio.test.js b/packages/web-components/test/display/natValue/stringifyRatio.test.js index 6faebce..4ebb44a 100644 --- a/packages/web-components/test/display/natValue/stringifyRatio.test.js +++ b/packages/web-components/test/display/natValue/stringifyRatio.test.js @@ -6,8 +6,8 @@ import { stringifyRatio, stringifyRatioAsFraction, stringifyRatioAsPercent, -} from '../../../src/display/index.js'; -import { makeRatio } from '../../../src/display/natValue/ratio.js'; +} from '../../../src/display/index.ts'; +import { makeRatio } from '../../../src/display/natValue/ratio.ts'; describe('stringifyRatio', () => { const ethBrand = Far('eth brand', {}); diff --git a/packages/web-components/test/display/setValue/stringifySet.test.js b/packages/web-components/test/display/setValue/stringifySet.test.js index 446056f..57ca547 100644 --- a/packages/web-components/test/display/setValue/stringifySet.test.js +++ b/packages/web-components/test/display/setValue/stringifySet.test.js @@ -1,7 +1,7 @@ // @ts-check import '../../installSesLockdown.js'; import { expect, test } from 'vitest'; -import { stringifySet } from '../../../src/display/setValue/stringifySet.js'; +import { stringifySet } from '../../../src/display/setValue/stringifySet.ts'; test(stringifySet, () => { expect(stringifySet(['foo', 'bar'])).toBe('2'); diff --git a/packages/web-components/test/wallet-connection/walletConnection.test.js b/packages/web-components/test/wallet-connection/walletConnection.test.js index 510191a..4f3df0d 100644 --- a/packages/web-components/test/wallet-connection/walletConnection.test.js +++ b/packages/web-components/test/wallet-connection/walletConnection.test.js @@ -1,7 +1,7 @@ // @ts-check import '../installSesLockdown.js'; import { describe, vi, expect, it } from 'vitest'; -import { makeAgoricWalletConnection } from '../../src/wallet-connection/walletConnection.js'; +import { makeAgoricWalletConnection } from '../../src/wallet-connection/walletConnection.ts'; import { makeAgoricSigner, // @ts-expect-error exported by mock below @@ -10,8 +10,8 @@ import { // @ts-expect-error exported by mock below // eslint-disable-next-line import/named provisionSmartWallet as mockProvisionSmartWallet, -} from '../../src/wallet-connection/makeAgoricSigner.js'; -import { Errors } from '../../src/wallet-connection/errors.js'; +} from '../../src/wallet-connection/makeAgoricSigner.ts'; +import { Errors } from '../../src/wallet-connection/errors.ts'; const testAddress = 'agoric123test'; const rpc = 'https://fake.rpc'; @@ -20,7 +20,7 @@ const rpc = 'https://fake.rpc'; // eslint-disable-next-line no-undef global.window = { keplr: {} }; -vi.mock('../../src/wallet-connection/makeAgoricSigner.js', () => { +vi.mock('../../src/wallet-connection/makeAgoricSigner.ts', () => { const submitSpendAction = vi.fn(); const provisionSmartWallet = vi.fn(); @@ -35,7 +35,7 @@ vi.mock('../../src/wallet-connection/makeAgoricSigner.js', () => { }; }); -vi.mock('../../src/queryBankBalances.js', () => { +vi.mock('../../src/queryBankBalances.ts', () => { return { queryBankBalances: vi.fn(), }; diff --git a/packages/web-components/tsconfig.build.json b/packages/web-components/tsconfig.build.json index 5d195ee..1741d4b 100644 --- a/packages/web-components/tsconfig.build.json +++ b/packages/web-components/tsconfig.build.json @@ -1,6 +1,7 @@ { "extends": "./tsconfig.json", "compilerOptions": { + "allowImportingTsExtensions": false, "noEmit": false, "declaration": true, "declarationMap": true diff --git a/packages/web-components/tsconfig.json b/packages/web-components/tsconfig.json index 4339750..5ef692e 100644 --- a/packages/web-components/tsconfig.json +++ b/packages/web-components/tsconfig.json @@ -2,6 +2,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { + "allowImportingTsExtensions": true, // for tests "outDir": "./dist", "checkJs": true },