diff --git a/package.json b/package.json index 59320016..420dcfcb 100644 --- a/package.json +++ b/package.json @@ -11,11 +11,11 @@ "scripts": { "build": "rimraf dist/ && tsc -p src/bin && tsc -p src/tsconfig.json && tsc-alias -p src/tsconfig.json && yarn grant-exec-perms && yarn copy-files dist/", "build:watch": "tsc -p src/tsconfig.json && (concurrently \"tsc -p src/tsconfig.json -w\" \"tsc-alias -p src/tsconfig.json\")", - "build:test": "rimraf dist_test/ && tsc -p test/tsconfig.json && tsc-alias -p test/tsconfig.json && yarn copy-files dist_test/", + "build:test": "rimraf dist_test/ && tsc -p test/tsconfig.json && tsc-alias -p test/tsconfig.json && yarn copy-files dist_test/src", "grant-exec-perms": "node dist/bin/tools/grant-exec-perms.js", "copy-files": "copyfiles -u 1 src/**/*.ftl", - "pretest": "yarn build:test", - "test": "node dist_test/test/bin && node dist_test/test/lib", + "test": "yarn build:test && node dist_test/test/bin && node dist_test/test/lib", + "test:sample-app": "yarn build:test && node dist_test/test/bin/main.js", "_format": "prettier '**/*.{ts,tsx,json,md}'", "format": "yarn _format --write", "format:check": "yarn _format --list-different", diff --git a/test/bin/main.ts b/test/bin/main.ts index 591ad850..70c633bb 100644 --- a/test/bin/main.ts +++ b/test/bin/main.ts @@ -7,7 +7,7 @@ import { getProjectRoot } from "keycloakify/bin/tools/getProjectRoot.js"; (async () => { await setupSampleReactProject(); - const binDirPath = pathJoin(getProjectRoot(), "dist_test", "bin"); + const binDirPath = pathJoin(getProjectRoot(), "dist_test", "src", "bin"); st.execSyncTrace( //`node ${pathJoin(binDirPath, "keycloakify")} --external-assets`,