diff --git a/.gitignore b/.gitignore index 2b40e74..fe56de9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ # compiled output dist/ +declarations/ tmp/ # dependencies diff --git a/package.json b/package.json index 98f6086..6778958 100644 --- a/package.json +++ b/package.json @@ -38,9 +38,9 @@ "start": "concurrently 'npm:start:*'", "start:js": "rollup --config --watch --no-watch.clearScreen", "start:types": "tsc --declaration --watch", - "test": "vitest --run", + "test": "cd tests && pnpm test", "test:types": "tsc --noEmit --project ./tests/type-tests/tsconfig.json", - "test:watch": "vitest", + "test:watch": "cd tests && pnpm test:watch", "prepack": "rollup --config" }, "dependencies": { @@ -70,7 +70,6 @@ "publint": "^0.2.7", "rollup": "^4.9.1", "rollup-plugin-copy": "^3.5.0", - "vitest": "^0.18.0", "typescript": "^5.3.3" }, "publishConfig": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 48fea36..a865ce6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -84,6 +84,16 @@ importers: typescript: specifier: ^5.3.3 version: 5.3.3 + + tests: + dependencies: + '@ember/string': + specifier: '*' + version: link:.. + devDependencies: + typescript: + specifier: 4.7.4 + version: 4.7.4 vitest: specifier: ^0.18.0 version: 0.18.1 @@ -6422,6 +6432,12 @@ packages: resolution: {integrity: sha512-LQPKVXK8QrBBkL/zclE6YgSWn0I8ew5m0Lf+XL00IwMhlotqRLlzHV+BRrljVQIc+NohUAuQP7mg4HQwrx5Xbg==} dev: true + /typescript@4.7.4: + resolution: {integrity: sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==} + engines: {node: '>=4.2.0'} + hasBin: true + dev: true + /typescript@5.3.3: resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} engines: {node: '>=14.17'} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 7a4de26..429d910 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,4 +1,3 @@ packages: - - 'ember-string' - - 'test-app' + - '.' - 'tests' diff --git a/tests/package.json b/tests/package.json new file mode 100644 index 0000000..aa431a9 --- /dev/null +++ b/tests/package.json @@ -0,0 +1,19 @@ +{ + "name": "@ember/string-tests", + "private": true, + "scripts": { + "test": "vitest --run", + "test:watch": "vitest" + }, + "dependencies": { + "@ember/string": "*" + }, + "devDependencies": { + "@ember/string": "workspace:*", + "typescript": "4.7.4", + "vitest": "^0.18.0" + }, + "volta": { + "extends": "../package.json" + } +} diff --git a/vitest.config.ts b/tests/vitest.config.ts similarity index 81% rename from vitest.config.ts rename to tests/vitest.config.ts index 12886bb..b55c0f5 100644 --- a/vitest.config.ts +++ b/tests/vitest.config.ts @@ -5,6 +5,6 @@ const extensions = '{js,mjs,cjs,ts,mts,cts,jsx,tsx}'; export default defineConfig({ test: { // relative to the directory where this config is located - include: [`tests/**/*test.${extensions}`], + include: [`**/*test.${extensions}`], }, });