From 0308d20c382d9f8eb9dac35ce01f05b3286f1c1c Mon Sep 17 00:00:00 2001 From: Toby Date: Sat, 20 Jan 2024 23:47:47 +0100 Subject: [PATCH] restructure --- .npmignore | 5 +---- {src => tests}/index.spec.ts | 2 +- {src => tests}/utils.spec.ts | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) rename {src => tests}/index.spec.ts (99%) rename {src => tests}/utils.spec.ts (98%) diff --git a/.npmignore b/.npmignore index b061537..ff7e944 100644 --- a/.npmignore +++ b/.npmignore @@ -1,9 +1,6 @@ .github/ src/ +tests/ .editorconfig -index.spec.js -index.test.js -utils.spec.js -utils.test.js jest.config.ts tsconfig.json \ No newline at end of file diff --git a/src/index.spec.ts b/tests/index.spec.ts similarity index 99% rename from src/index.spec.ts rename to tests/index.spec.ts index fffd99e..149dfdc 100644 --- a/src/index.spec.ts +++ b/tests/index.spec.ts @@ -2,7 +2,7 @@ import crypto from 'node:crypto' Object.defineProperty(global, 'crypto', { value: { subtle: crypto.webcrypto.subtle }}) import { describe, expect, test } from '@jest/globals' -import jwt, { JwtAlgorithm } from '.' +import jwt, { JwtAlgorithm } from '../src/index' type Dataset = { public: string diff --git a/src/utils.spec.ts b/tests/utils.spec.ts similarity index 98% rename from src/utils.spec.ts rename to tests/utils.spec.ts index 56b02bd..2df1d97 100644 --- a/src/utils.spec.ts +++ b/tests/utils.spec.ts @@ -11,7 +11,7 @@ import { textToBase64Url, pemToBinary, importTextSecret -} from './utils' +} from '../src/utils' describe('Converters', () => { const testString = 'cloudflare-worker-jwt'