Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pmoo/testy

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pmoo/testy - npm Package Compare versions

Comparing version 7.0.1 to 7.0.2

13

lib/core/test.js

@@ -28,5 +28,6 @@ 'use strict';

async run(context) {
const state = { isRunning: true };
await Promise.race([
this.#timeoutThreshold(context.testExecutionTimeoutMs),
TestResult.evaluate(this, context),
this.#timeoutThreshold(context.testExecutionTimeoutMs, state),
TestResult.evaluate(this, context).then(_result => state.isRunning = false),
]);

@@ -154,7 +155,9 @@ }

#timeoutThreshold(timeoutMs) {
#timeoutThreshold(timeoutMs, state) {
return new Promise(resolve => {
setTimeout(() => {
this.setResult(TestResult.error(I18nMessage.of('reached_timeout_error', timeoutMs)));
this.finishWithError();
if (state.isRunning) {
this.setResult(TestResult.error(I18nMessage.of('reached_timeout_error', timeoutMs)));
this.finishWithError();
}
// This is resolve() and not reject() because we want other tests to be executed.

@@ -161,0 +164,0 @@ // There was an error in terms of the test itself, but there was not an error in terms of Testy's execution.

{
"name": "@pmoo/testy",
"version": "7.0.1",
"version": "7.0.2",
"description": "A minimal testing framework, for educational purposes.",

@@ -5,0 +5,0 @@ "homepage": "https://ngarbezza.github.io/testy/",

@@ -275,2 +275,3 @@ # Testy

<td align="center"><a href="https://github.com/ignacio-r"><img src="https://avatars.githubusercontent.com/u/42122391?v=4" width="100px;" alt=""/><br /><sub><b>Ignacio Robledo</b></sub></a><br /><a href="https://github.com/ngarbezza/testy/commits?author=ignacio-r" title="Code">💻</a> <a href="https://github.com/ngarbezza/testy/commits?author=ignacio-r" title="Tests">⚠️</a></td>
<td align="center"><a href="https://github.com/mellster2012"><img src="https://avatars.githubusercontent.com/u/2126256?v=4" width="100px;" alt=""/><br /><sub><b>Marco Ellwanger</b></sub></a><br /><a href="https://github.com/ngarbezza/testy/commits?author=mellster2012" title="Code">💻</a> <a href="https://github.com/ngarbezza/testy/commits?author=mellster2012" title="Tests">⚠️</a></td>
</tr>

@@ -277,0 +278,0 @@ </table>

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