forked from asyncapi/spec-json-schemas
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(definitions): Anypoint MQ bindings new tests structure
- Loading branch information
Showing
13 changed files
with
105 additions
and
126 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
test/bindings/anypointmq/0.0.1/channel/only required properties.json
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
test/bindings/anypointmq/0.0.1/channel/without required properties.json
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
test/bindings/anypointmq/0.0.1/message/only required properties.json
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
test/bindings/anypointmq/0.0.1/message/without required properties.json
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
49 changes: 49 additions & 0 deletions
49
test/bindings/anypointmq/anypointmq channel binding.test.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { | ||
JsonSchemaTestSuite, | ||
JsonSchemaTestSuiteConfig, | ||
JsonSchemaTestSuiteData | ||
} from '@test/definitions/base-schema-test.mjs'; | ||
import {describe} from 'vitest'; | ||
|
||
const config = new JsonSchemaTestSuiteConfig( | ||
false, | ||
[], | ||
true, | ||
[] | ||
); | ||
|
||
let data = { | ||
"0.0.1": new JsonSchemaTestSuiteData( | ||
require(`@bindings/anypointmq/0.0.1/channel.json`), | ||
[ | ||
{ | ||
"destination": "user-signup-exchg", | ||
"destinationType": "exchange", | ||
"bindingVersion": "0.0.1" | ||
} | ||
], | ||
{}, | ||
{}, | ||
{ | ||
"x-number": 0, | ||
"x-string": "", | ||
"x-object": { | ||
"property": {} | ||
} | ||
}, | ||
{ | ||
"x-number": 0, | ||
"x-string": "", | ||
"x-object": { | ||
"property": {} | ||
}, | ||
"ext-number": 1 | ||
} | ||
), | ||
} | ||
|
||
describe.each([ | ||
'0.0.1', | ||
])('Anypoint MQ channel binding v%s', (bindingVersion) => { | ||
new JsonSchemaTestSuite(data[bindingVersion], config).testSuite() | ||
}) |
56 changes: 56 additions & 0 deletions
56
test/bindings/anypointmq/anypointmq message binding.test.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { | ||
JsonSchemaTestSuite, | ||
JsonSchemaTestSuiteConfig, | ||
JsonSchemaTestSuiteData | ||
} from '@test/definitions/base-schema-test.mjs'; | ||
import {describe} from 'vitest'; | ||
|
||
const config = new JsonSchemaTestSuiteConfig( | ||
false, | ||
[], | ||
true, | ||
[] | ||
); | ||
|
||
let data = { | ||
"0.0.1": new JsonSchemaTestSuiteData( | ||
require(`@bindings/anypointmq/0.0.1/message.json`), | ||
[ | ||
{ | ||
"headers": { | ||
"type": "object", | ||
"properties": { | ||
"correlationId": { | ||
"description": "Correlation ID set by application", | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"bindingVersion": "0.0.1" | ||
} | ||
], | ||
{}, | ||
{}, | ||
{ | ||
"x-number": 0, | ||
"x-string": "", | ||
"x-object": { | ||
"property": {} | ||
} | ||
}, | ||
{ | ||
"x-number": 0, | ||
"x-string": "", | ||
"x-object": { | ||
"property": {} | ||
}, | ||
"ext-number": 1 | ||
} | ||
), | ||
} | ||
|
||
describe.each([ | ||
'0.0.1', | ||
])('Anypoint MQ message binding v%s', (bindingVersion) => { | ||
new JsonSchemaTestSuite(data[bindingVersion], config).testSuite() | ||
}) |
This file was deleted.
Oops, something went wrong.