Skip to content

Commit

Permalink
test(definitions): fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Pakisan committed Jun 2, 2024
1 parent 6cc2bb5 commit 8ec723d
Show file tree
Hide file tree
Showing 162 changed files with 2,261 additions and 3,367 deletions.
64 changes: 0 additions & 64 deletions test/bindings/amqp/0.2.0/channel/channel.test.js

This file was deleted.

44 changes: 44 additions & 0 deletions test/bindings/amqp/0.2.0/channel/index.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import {describe, it} from 'vitest';
import TestHelper from '@test/test-helper';
import path from 'path';

const jsonSchema = require('@bindings/amqp/0.2.0/channel.json');

describe('Channel', () => {
it('is: routingKey', () => TestHelper.objectIsValid(
jsonSchema,
path.resolve(__dirname, './examples/is routing key.json'),
));

it('is: queue', () => TestHelper.objectIsValid(
jsonSchema,
path.resolve(__dirname, './examples/is queue.json'),
));

it.skip('empty', () => TestHelper.objectIsNotValid(
jsonSchema,
path.resolve(__dirname, './empty.json'),
['must have required property \'is\'']
));

it.skip('without required properties', () => TestHelper.objectIsNotValid(
jsonSchema,
path.resolve(__dirname, './without required properties.json'),
['must have required property \'is\'']
));

it.skip('only required properties', () => TestHelper.objectIsValid(
jsonSchema,
path.resolve(__dirname, './only required properties.json'),
));

it('extended', () => TestHelper.objectIsValid(
jsonSchema,
path.resolve(__dirname, './extended.json'),
));

it('wrongly extended', () => TestHelper.wronglyExtended(
jsonSchema,
path.resolve(__dirname, './wrongly extended.json')
));
});
37 changes: 37 additions & 0 deletions test/bindings/amqp/0.2.0/message/index.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import {describe, it} from 'vitest';
import TestHelper from '@test/test-helper';
import path from 'path';

const jsonSchema = require('@bindings/amqp/0.2.0/message.json');

describe('Message', () => {
it('example', () => TestHelper.objectIsValid(
jsonSchema,
path.resolve(__dirname, './example.json')
));

it('empty', () => TestHelper.objectIsValid(
jsonSchema,
path.resolve(__dirname, './empty.json')
));

it('without required properties', () => TestHelper.objectIsValid(
jsonSchema,
path.resolve(__dirname, './without required properties.json')
));

it('only required properties', () => TestHelper.objectIsValid(
jsonSchema,
path.resolve(__dirname, './only required properties.json')
));

it('extended', () => TestHelper.objectIsValid(
jsonSchema,
path.resolve(__dirname, './extended.json')
));

it('wrongly extended', () => TestHelper.wronglyExtended(
jsonSchema,
path.resolve(__dirname, './wrongly extended.json')
));
});
53 changes: 0 additions & 53 deletions test/bindings/amqp/0.2.0/message/message.test.js

This file was deleted.

37 changes: 37 additions & 0 deletions test/bindings/amqp/0.2.0/operation/index.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import {describe, it} from 'vitest';
import TestHelper from '@test/test-helper';
import path from 'path';

const jsonSchema = require('@bindings/amqp/0.2.0/operation.json');

describe('Operation', () => {
it('example', () => TestHelper.objectIsValid(
jsonSchema,
path.resolve(__dirname, './example.json')
));

it('empty', () => TestHelper.objectIsValid(
jsonSchema,
path.resolve(__dirname, './empty.json')
));

it('without required properties', () => TestHelper.objectIsValid(
jsonSchema,
path.resolve(__dirname, './without required properties.json')
));

it('only required properties', () => TestHelper.objectIsValid(
jsonSchema,
path.resolve(__dirname, './only required properties.json')
));

it('extended', () => TestHelper.objectIsValid(
jsonSchema,
path.resolve(__dirname, './extended.json')
));

it('wrongly extended', () => TestHelper.wronglyExtended(
jsonSchema,
path.resolve(__dirname, './wrongly extended.json')
));
});
53 changes: 0 additions & 53 deletions test/bindings/amqp/0.2.0/operation/operation.test.js

This file was deleted.

3 changes: 0 additions & 3 deletions test/bindings/amqp/0.2.0/server/example.json

This file was deleted.

54 changes: 0 additions & 54 deletions test/bindings/amqp/0.2.0/server/server.test.mjs

This file was deleted.

This file was deleted.

Loading

0 comments on commit 8ec723d

Please sign in to comment.