(core) Cleaning after app sumo and billing discount tests

Summary:
- Cleaning stripe data after billing tests
- Better stripe webhook test integration, that should fix test interference
- Not importing why-is-node-running when its not needed, which improves dev experience.

Test Plan: Modified

Reviewers: dsagal

Reviewed By: dsagal

Subscribers: dsagal

Differential Revision: https://phab.getgrist.com/D3932
pull/550/head
Jarosław Sadziński 11 months ago
parent 331aa3152f
commit e09e8f7160

@ -6,12 +6,15 @@
* We use why-is-node-running module to print something informative.
*/
/* global after */
const whyIsNodeRunning = require('why-is-node-running');
// --no-exit|-E flag is interpreted by mocha-webdriver library to start REPL on failure, and we
// do NOT want to output a big dump about that.
const noexit = process.argv.includes("--no-exit") || process.argv.includes('-E');
// Don't load why-is-node-running if we're not going to use it. It probably means that we're
// in a debugging session, and this module creates async hooks that interfere with debugging.
const whyIsNodeRunning = noexit ? null : require('why-is-node-running');
function report() {
whyIsNodeRunning();
whyIsNodeRunning?.();
console.warn("*******************************************************");
console.warn("Something above prevented node from exiting on its own.");
console.warn("*******************************************************");
@ -21,9 +24,6 @@ function report() {
}
after(() => {
// --no-exit|-E flag is interpreted by mocha-webdriver library to start REPL on failure, and we
// do NOT want to output a big dump about that.
const noexit = process.argv.includes("--no-exit") || process.argv.includes('-E');
if (noexit) {
console.log("report-why-tests-hang silenced with --no-exit flag");
} else {

Loading…
Cancel
Save