Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Gijsdeman committed Dec 12, 2023
1 parent 00db498 commit 9381c8b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -30,7 +30,7 @@
"cy:open": "cypress open",
"format": "prettier . --check --ignore-unknown --ignore-path .prettierignore",
"lint": "eslint . --ignore-path .gitignore --ext .ts,.tsx,.js",
"test": "jest",
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
"test:cypress:dev": "start-server-and-test watch:demo http://localhost:3000 cy:open",
"test:cypress": "start-server-and-test serve http://localhost:3000 cy:run",
"release:changelog": "scripts/changelog.ts",
Expand Down
Expand Up @@ -11,7 +11,7 @@ import { SchemaObject } from "../openapi/types";
import { createNodes } from "./createSchema";

describe("createNodes", () => {
it("should create readable MODs for oneOf primitive properties", () => {
it("should create readable MODs for oneOf primitive properties", async () => {
const schema: SchemaObject = {
type: "object",
properties: {
Expand Down Expand Up @@ -48,8 +48,10 @@ describe("createNodes", () => {
},
};
expect(
createNodes(schema, "request").map((md: any) =>
prettier.format(md, { parser: "babel" })
await Promise.all(
createNodes(schema, "request").map(
async (md: any) => await prettier.format(md, { parser: "babel" })
)
)
).toMatchSnapshot();
});
Expand Down

0 comments on commit 9381c8b

Please sign in to comment.