mirror of
https://github.com/postmanlabs/openapi-to-postman.git
synced 2022-11-29 22:05:00 +03:00
removing duplicated tests
This commit is contained in:
@@ -1443,63 +1443,4 @@ describe('getReferences method when node does not have any reference', function(
|
||||
expect(result.referencesInNode[0].newValue.$ref).to.equal('the/parent/user.yaml');
|
||||
});
|
||||
|
||||
it('should return error when "type" parameter is not sent', async function () {
|
||||
let input = {
|
||||
rootFiles: [
|
||||
{
|
||||
path: '/root.yaml',
|
||||
content: ''
|
||||
}
|
||||
],
|
||||
data: [
|
||||
{
|
||||
path: '/examples.yaml',
|
||||
content: ''
|
||||
}
|
||||
],
|
||||
options: {},
|
||||
bundleFormat: 'JSON'
|
||||
};
|
||||
try {
|
||||
await Converter.bundle(input);
|
||||
}
|
||||
catch (error) {
|
||||
expect(error).to.not.be.undefined;
|
||||
expect(error.message).to.equal('"Type" parameter should be provided');
|
||||
}
|
||||
});
|
||||
|
||||
it('should return error when input is an empty object', async function () {
|
||||
try {
|
||||
await Converter.bundle({});
|
||||
}
|
||||
catch (error) {
|
||||
expect(error).to.not.be.undefined;
|
||||
expect(error.message).to.equal('Input object must have "type" and "data" information');
|
||||
}
|
||||
});
|
||||
|
||||
it('should return error when input data is an empty array', async function () {
|
||||
try {
|
||||
await Converter.bundle({ type: 'multiFile', data: [] });
|
||||
}
|
||||
catch (error) {
|
||||
expect(error).to.not.be.undefined;
|
||||
expect(error.message).to.equal('"Data" parameter should be provided');
|
||||
}
|
||||
});
|
||||
|
||||
it('should return error when "type" parameter is not multiFile', async function () {
|
||||
try {
|
||||
await Converter.bundle({
|
||||
type: 'folder',
|
||||
bundleFormat: 'JSON',
|
||||
data: []
|
||||
});
|
||||
}
|
||||
catch (error) {
|
||||
expect(error).to.not.be.undefined;
|
||||
expect(error.message).to.equal('"Type" parameter value allowed is multiFile');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user