Skip to content

Commit

Permalink
Add draft of SQLite integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jolg42 committed Mar 5, 2020
1 parent 72d0ac4 commit a57057c
Show file tree
Hide file tree
Showing 6 changed files with 2,129 additions and 5 deletions.
2 changes: 2 additions & 0 deletions cli/prisma2/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ photogen_prisma_ncc_build
examples
prisma-test-utils_ncc
tmp
tmp-sqlite
tmp-postgresql
@prisma
pkg-build
download-done
Expand Down
12 changes: 8 additions & 4 deletions cli/prisma2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"@sentry/node": "5.12.4",
"@types/debug": "^4.1.5",
"@types/mocha": "^5.2.7",
"@types/sqlite3": "^3.1.6",
"@zeit/ncc": "0.21.0",
"checkpoint-client": "^1.0.7",
"dotenv": "^8.2.0",
Expand All @@ -64,6 +65,7 @@
"rimraf": "^3.0.0",
"serialize-error": "^5.0.0",
"snap-shot-it": "^7.9.2",
"sqlite3": "^4.1.1",
"strip-ansi": "^6.0.0",
"strip-indent": "3.0.0",
"terminal-link": "^2.0.0",
Expand All @@ -73,10 +75,12 @@
"typescript": "^3.8.2"
},
"scripts": {
"test": "./fixtures/test.sh && ./node_modules/.bin/mocha src/__tests__/integrate.test.ts --require ts-mocha src/__tests__/integrate.test.ts --timeout 10s",
"test:debug": "./node_modules/.bin/mocha --inspect-brk src/__tests__/integrate.test.ts --require ts-mocha src/__tests__/integrate.test.ts --timeout 10s",
"test:mocha": "./node_modules/.bin/mocha src/__tests__/integrate.test.ts --require ts-mocha src/__tests__/integrate.test.ts --timeout 10s",
"test:update-snapshots": "SNAPSHOT_UPDATE=1 ./node_modules/.bin/mocha src/__tests__/integrate.test.ts --require ts-mocha src/__tests__/integrate.test.ts --timeout 10s",
"test-sqlite": "./node_modules/.bin/mocha src/__tests__/integrate.sqlite.test.ts --require ts-mocha src/__tests__/integrate.sqlite.test.ts --timeout 10s",
"test-postgresql": "./node_modules/.bin/mocha src/__tests__/integrate.potsgresql.test.ts --require ts-mocha src/__tests__/integrate.potsgresql.test.ts --timeout 10s",
"test": "./fixtures/test.sh && pnpm run test-sqlite && pnpm run test-postgresql",
"test:debug": "./node_modules/.bin/mocha --inspect-brk src/__tests__/integrate.* --require ts-mocha src/__tests__/integrate.* --timeout 10s",
"test:mocha": "./node_modules/.bin/mocha src/__tests__/integrate.* --require ts-mocha src/__tests__/integrate.* --timeout 10s",
"test:update-snapshots": "SNAPSHOT_UPDATE=1 ./node_modules/.bin/mocha src/__tests__/integrate.* --require ts-mocha src/__tests__/integrate.* --timeout 10s",
"install": "node download-build/index.js",
"download": "rm -f download-done && node scripts/updateTag.js && node scripts/download.js || echo \"\"",
"tsc": "tsc -d && cp src/capture-worker.js dist/capture-worker.js && bash scripts/copy-runtime-dist.sh",
Expand Down
Binary file added cli/prisma2/sqlite.test.db
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const db = new Client({
})

const pkg = pkgup.sync() || __dirname
const tmp = join(dirname(pkg), 'tmp')
const tmp = join(dirname(pkg), 'tmp-postgresql')
const engine = new IntrospectionEngine()
const latestAlphaPromise = getLatestAlphaTag()

Expand Down

0 comments on commit a57057c

Please sign in to comment.