New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@travetto/test

Package Overview
Dependencies
Maintainers
1
Versions
358
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@travetto/test - npm Package Compare versions

Comparing version 0.0.31 to 0.0.32

2

package.json

@@ -31,3 +31,3 @@ {

},
"version": "0.0.31"
"version": "0.0.32"
}

@@ -20,4 +20,9 @@ import * as fs from 'fs';

static asyncTimeout(duration?: number) {
return new Promise((_, reject) => setTimeout(() => reject(TIMEOUT), duration || this.timeout).unref());
static asyncTimeout(duration?: number): [Promise<any>, Function] {
let id: NodeJS.Timer;
const prom = new Promise((_, reject) => {
id = setTimeout(() => reject(TIMEOUT), duration || this.timeout);
id.unref()
});
return [prom, () => clearTimeout(id)];
}

@@ -69,3 +74,5 @@

for (const fn of suite[phase]) {
await Promise.race([this.asyncTimeout(), fn.call(suite.instance)]);
const [timeout, clear] = this.asyncTimeout();
await Promise.race([timeout, fn.call(suite.instance)]);
clear();
}

@@ -76,3 +83,3 @@ } catch (error) {

}
const res = await this.generateSuiteError(consumer, suite, phase, error);
const res = await this.generateSuiteError(consumer, suite, `[[${phase}]]`, error);
result.tests.push(res);

@@ -153,5 +160,6 @@ result.fail++;

const timeout = this.asyncTimeout(test.timeout);
const [timeout, clear] = this.asyncTimeout(test.timeout);
const res = await Promise.race([suite.instance[test.methodName](), timeout]);
result.status = 'success';
clear();
} catch (err) {

@@ -158,0 +166,0 @@ if (err === TIMEOUT) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc