-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(api): extract TMDB mock server to a separate app
This is used for e2e tests. Related to #83
- Loading branch information
1 parent
a426389
commit 77fdbfb
Showing
15 changed files
with
106 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.nx/cache | ||
.env | ||
node_modules | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
dist | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
{ | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"name": "@serieslist/e2e", | ||
"implicitDependencies": ["@serieslist/api", "@serieslist/webapp"] | ||
"implicitDependencies": [ | ||
"@serieslist/api", | ||
"@serieslist/webapp", | ||
"@serieslist/tmdb-mock-server" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,7 @@ export const config = { | |
api: { | ||
url: process.env.VITE_API_URL!, | ||
}, | ||
tmdb: { | ||
url: process.env.TMDB_URL!, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"extends": "@serieslist/eslint-config-base", | ||
"root": true, | ||
"overrides": [ | ||
{ | ||
"files": ["src/main.ts"], | ||
"rules": { | ||
"@typescript-eslint/no-non-null-assertion": "off" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"@serieslist/prettier-config" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { buildEsbuild } from '@serieslist/esbuild' | ||
|
||
import pkg from '../package.json' | ||
|
||
await buildEsbuild({ | ||
packageJson: pkg, | ||
entryPoints: ['src/main.ts'], | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"name": "@serieslist/tmdb-mock-server", | ||
"version": "1.0.0", | ||
"type": "module", | ||
"scripts": { | ||
"build": "rimraf dist && NODE_ENV=production tsx bin/build.ts", | ||
"lint": "eslint src", | ||
"tsc": "tsc --noEmit", | ||
"start:e2e": "NODE_ENV=production node dist/main.js" | ||
}, | ||
"devDependencies": { | ||
"@serieslist/esbuild": "workspace:*", | ||
"@serieslist/eslint-config-base": "workspace:*", | ||
"@serieslist/prettier-config": "workspace:*", | ||
"@serieslist/typescript-config-base": "workspace:*", | ||
"rimraf": "^4.4.0", | ||
"tsx": "^4.7.0", | ||
"typescript": "^5.3.3" | ||
}, | ||
"dependencies": { | ||
"@serieslist/logger": "workspace:*", | ||
"@serieslist/tmdb": "workspace:*", | ||
"fastify": "^4.18.0", | ||
"just-omit": "^2.2.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** | ||
* Create an array with the given length, filled with `null`s. | ||
*/ | ||
export const createArrayOfLength = (length: number) => | ||
/* eslint-disable-next-line prefer-spread*/ | ||
Array.apply(null, Array(length)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "@serieslist/typescript-config-base" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
node_modules/ | ||
dist/ | ||
coverage |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.