Skip to content

Commit

Permalink
Adjust Rollup and Vite unit tests to use their full build pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
zauni committed Sep 23, 2024
1 parent c273da7 commit 82cf03e
Show file tree
Hide file tree
Showing 10 changed files with 267 additions and 511 deletions.
95 changes: 0 additions & 95 deletions package-lock.json

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

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@
"@vitest/ui": "^2.1.0",
"astro": "^4.15.6",
"esbuild": "^0.23.1",
"fs-monkey": "^1.0.6",
"glob": "^11.0.0",
"memfs": "^4.11.1",
"openapi-types": "^12.1.3",
"rolldown": "^0.13.2",
Expand Down
57 changes: 12 additions & 45 deletions src/__snapshots__/rollup.unit.test.ts.snap
Original file line number Diff line number Diff line change
@@ -1,47 +1,7 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Rollup plugin > should handle a \`.yml\` file extension 1`] = `
"export default {
openapi: "3.0.0",
info: {
title: "Test API",
version: "1.0.0"
},
paths: {
"/my/path": {
get: {
summary: "Some GET request",
responses: {
"200": {
description: "Some response",
content: {
"application/json": {
schema: {
type: "object",
properties: {
someKey: {
type: "string"
}
},
required: [
"someKey"
]
},
example: {
someKey: "some value"
}
}
}
}
}
}
}
}
};"
`;

exports[`Rollup plugin > should handle a JSON schema with a reference 1`] = `
"export default {
"var api = {
openapi: "3.0.0",
info: {
title: "My great API",
Expand Down Expand Up @@ -78,14 +38,18 @@ exports[`Rollup plugin > should handle a JSON schema with a reference 1`] = `
}
}
}
};"
};
console.log(api);
"
`;

exports[`Rollup plugin > should handle a YAML schema with a reference 1`] = `
"export default {
"var api = {
openapi: "3.0.0",
info: {
title: "Test API",
title: "My great API",
description: "Great description",
version: "1.0.0"
},
paths: {
Expand Down Expand Up @@ -118,5 +82,8 @@ exports[`Rollup plugin > should handle a YAML schema with a reference 1`] = `
}
}
}
};"
};
console.log(api);
"
`;
Loading

0 comments on commit 82cf03e

Please sign in to comment.