From 0c38c3cffe4b646c1228cd0e543545875b87191d Mon Sep 17 00:00:00 2001 From: Paul Kaplan Date: Tue, 27 Nov 2018 16:06:56 -0500 Subject: [PATCH] Force exiting after tests finish --- test/unit/engine_runtime.js | 6 +++++- test/unit/virtual-machine.js | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/test/unit/engine_runtime.js b/test/unit/engine_runtime.js index 704da17b2..2d5c28978 100644 --- a/test/unit/engine_runtime.js +++ b/test/unit/engine_runtime.js @@ -1,4 +1,4 @@ -const test = require('tap').test; +const tap = require('tap'); const path = require('path'); const readFileToBuffer = require('../fixtures/readProjectFile').readFileToBuffer; const VirtualMachine = require('../../src/virtual-machine'); @@ -6,6 +6,10 @@ const Runtime = require('../../src/engine/runtime'); const MonitorRecord = require('../../src/engine/monitor-record'); const {Map} = require('immutable'); +tap.tearDown(() => process.nextTick(process.exit)); + +const test = tap.test; + test('spec', t => { const r = new Runtime(); diff --git a/test/unit/virtual-machine.js b/test/unit/virtual-machine.js index e8bbdc824..78036fdcf 100644 --- a/test/unit/virtual-machine.js +++ b/test/unit/virtual-machine.js @@ -1,4 +1,4 @@ -const test = require('tap').test; +const tap = require('tap'); const VirtualMachine = require('../../src/virtual-machine'); const Sprite = require('../../src/sprites/sprite'); const Variable = require('../../src/engine/variable'); @@ -8,6 +8,10 @@ const Renderer = require('../fixtures/fake-renderer'); const Runtime = require('../../src/engine/runtime'); const RenderedTarget = require('../../src/sprites/rendered-target'); +tap.tearDown(() => process.nextTick(process.exit)); + +const test = tap.test; + test('deleteSound returns function after deleting or null if nothing was deleted', t => { const vm = new VirtualMachine(); const sprite = new Sprite();