How to destroy firebase ref in node

后端 未结 2 507
闹比i
闹比i 2020-12-10 05:52

If I do this in node:

console.log(\'1\');
console.log(\'2\');

outputs:

1
2

And the process ends.

2条回答
  •  悲哀的现实
    2020-12-10 06:37

    One workaround I found when using tape was to call test.onFinish(() => process.exit()); at the end. It's not ideal but it seems to get the job done running it both directly and with a test runner.

    Example:

    const test = require('tape');
    
    test('Some test', (t) => {
      // test code
    });
    
    test('Another test', (t) => {
      // test code
    });
    
    test.onFinish(() => process.exit());
    

提交回复
热议问题