Skip to content

Commit 3e524e0

Browse files
author
dhwaneetbhatt
committed
Fix unit tests
1 parent e75c686 commit 3e524e0

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
"newman": "5.3.2",
4848
"jsdoc": "3.6.10",
4949
"mocha": "6.2.3",
50-
"lodash": "4.17.21",
5150
"nyc": "14.1.1",
5251
"parse-gitignore": "1.0.1",
5352
"pretty-ms": "3.2.0",

test/codegen/structure.test.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,13 @@ const expectedOptions = {
8181
default: false,
8282
description: 'Modifies code snippet to incorporate ES6 (EcmaScript) features'
8383
},
84+
async_await_enabled: {
85+
name: 'Use async/await',
86+
id: 'async_await_enabled',
87+
type: 'boolean',
88+
default: false,
89+
description: 'Modifies code snippet to use async/await'
90+
},
8491
quoteType: {
8592
name: 'Quote Type',
8693
type: 'enum',
@@ -106,6 +113,7 @@ const expectedOptions = {
106113
'protocol',
107114
'useMimeType',
108115
'ES6_enabled',
116+
'async_await_enabled',
109117
'quoteType',
110118
'asyncType',
111119
'ignoreWarnings'
@@ -143,8 +151,8 @@ describe('Code-gen repository ' + codegen, function () {
143151
expect(json.com_postman_plugin).to.have.property('variant');
144152
expect(json.com_postman_plugin).to.have.property('syntax_mode');
145153
expect(json).to.have.property('engines');
146-
expect(json.engines).to.eql({
147-
node: '>=8'
154+
expect(json.engines).to.satisfy(function (engines) {
155+
return engines.hasOwnProperty('node') && (engines.node === '>=8' || engines.node === '>=12');
148156
});
149157
});
150158

0 commit comments

Comments
 (0)