Skip to content

Commit

Permalink
Merge pull request #425 from dreamit-de/fastcheck-poc
Browse files Browse the repository at this point in the history
Add fastcheck tests
  • Loading branch information
sgohlke authored Dec 13, 2024
2 parents 4b767f5 + 2cff475 commit f00f488
Show file tree
Hide file tree
Showing 6 changed files with 3,437 additions and 2,892 deletions.
69 changes: 67 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dreamit/graphql-server",
"version": "4.12.1",
"version": "4.12.2",
"description": "A GraphQL server written in NodeJS/Typescript.",
"scripts": {
"build": "tsup-node",
Expand Down Expand Up @@ -42,11 +42,13 @@
},
"homepage": "https://github.com/dreamit-de/graphql-server#readme",
"devDependencies": {
"@fast-check/vitest": "0.1.4",
"@sgohlke/stryker-log-ignorer": "2.0.2",
"@stryker-mutator/vitest-runner": "8.7.1",
"@types/content-type": "1.1.8",
"@types/node": "22.10.2",
"@vitest/coverage-v8": "2.1.8",
"fast-check": "3.23.1",
"oxlint": "0.15.0",
"prettier": "3.4.2",
"prettier-plugin-organize-imports": "4.1.0",
Expand Down
2 changes: 1 addition & 1 deletion src/request/ExtractInformationFromRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function extractInformationFromBody(
const bodyIsString = typeof body === 'string'
const bodyIsObject = typeof body === 'object'

if (!bodyIsString && !bodyIsObject) {
if (!body || (!bodyIsString && !bodyIsObject)) {
return {
error: {
graphQLError: new GraphQLError(
Expand Down
Loading

0 comments on commit f00f488

Please sign in to comment.