From 01c3baa8c43e976267c47934b99f7f4b210d36b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alvaro=20Cabrera=20Dur=C3=A1n?= <pateketrueke@gmail.com> Date: Tue, 8 Oct 2019 20:50:59 -0500 Subject: [PATCH] Disable async/await to run on v6 --- tests/unit/core/randomGeneration.spec.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/unit/core/randomGeneration.spec.js b/tests/unit/core/randomGeneration.spec.js index 59c4280c..8f7e5e56 100644 --- a/tests/unit/core/randomGeneration.spec.js +++ b/tests/unit/core/randomGeneration.spec.js @@ -4,7 +4,7 @@ import jsf from '../../../src'; /* global describe, it */ describe('Random Generation', () => { - it('should generate all the fields with alwaysFakeOptionals option and additionalProperties: true', async () => { + it('should generate all the fields with alwaysFakeOptionals option and additionalProperties: true', () => { jsf.option({ alwaysFakeOptionals: true, }); @@ -19,11 +19,11 @@ describe('Random Generation', () => { additionalProperties: true, }; - const resolved = await jsf.resolve(schema); - - expect(Object.keys(resolved).length).to.be.at.least(2); + return jsf.resolve(schema).then(resolved => { + expect(Object.keys(resolved).length).to.be.at.least(2); + }); }); - it('should generate all the fields with alwaysFakeOptionals option and additionalProperties: false', async () => { + it('should generate all the fields with alwaysFakeOptionals option and additionalProperties: false', () => { jsf.option({ alwaysFakeOptionals: true, }); @@ -38,8 +38,8 @@ describe('Random Generation', () => { additionalProperties: false, }; - const resolved = await jsf.resolve(schema); - - expect(Object.keys(resolved).length).is.eql(2); + return jsf.resolve(schema).then(resolved => { + expect(Object.keys(resolved).length).is.eql(2); + }); }); }); -- GitLab