Skip to content

Commit

Permalink
fix: add check that $ref value is a string (asyncapi#92)
Browse files Browse the repository at this point in the history
Co-authored-by: Maciej Urbańczyk <[email protected]>
  • Loading branch information
aeworxet and magicmatatjahu committed Nov 3, 2022
1 parent 0e23d81 commit f75d825
Showing 1 changed file with 6 additions and 0 deletions.
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

0 comments on commit f75d825

Please sign in to comment.