Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add check that $ref value is a string (#92) #94

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: add check that $ref value is a string (#92)
Co-authored-by: Maciej Urbańczyk <[email protected]>
  • Loading branch information
aeworxet and magicmatatjahu committed Nov 3, 2022
commit f75d825a5c9e13672c4a05493c8f1132568e3e8b
6 changes: 6 additions & 0 deletions tests/lib/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ describe('bundler should ', () => {
test('should not throw if value of `$ref` is not a string', async () => {
const files = ['./tests/wrong-ref-not-string.yaml'];

// If async function `bundle()` resolved Promise successfully, that means it
// did not throw exception during process of execution, which is the
// objective of testing.
expect(
await bundle(
files.map(file =>
Expand All @@ -59,6 +62,9 @@ describe('bundler should ', () => {
test('should not throw if value of `$ref` is absent', async () => {
const files = ['./tests/wrong-ref-absent.yaml'];

// If async function `bundle()` resolved Promise successfully, that means it
// did not throw exception during process of execution, which is the
// objective of testing.
expect(
await bundle(
files.map(file =>
Expand Down