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

@travetto/test

Package Overview
Dependencies
Maintainers
1
Versions
352
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.36 to 0.0.37

2

package.json

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

},
"version": "0.0.36"
"version": "0.0.37"
}

@@ -52,3 +52,3 @@ import { AppEnv } from '@travetto/base';

static asserts: Assertion[] = [];
static assertions: Assertion[] = [];
static listener?: (a: Assertion) => void;

@@ -83,3 +83,3 @@ static test: TestConfig;

this.listener = listener;
this.asserts = [];
this.assertions = [];
}

@@ -166,3 +166,3 @@

static add(a: Assertion) {
this.asserts.push(a);
this.assertions.push(a);
if (this.listener) {

@@ -174,4 +174,4 @@ this.listener(a);

static end() {
const ret = this.asserts;
this.asserts = [];
const ret = this.assertions;
this.assertions = [];
delete this.listener, this.test;

@@ -178,0 +178,0 @@ return ret;

import * as fs from 'fs';
import * as readline from 'readline';
import * as assert from 'assert';
import { bulkFind } from '@travetto/base';
import { bulkFind, BaseError } from '@travetto/base';

@@ -167,3 +167,3 @@ import { TestConfig, TestResult, SuiteConfig, SuiteResult, Assertion } from '../model';

if (err === TIMEOUT) {
err = new Error('Operation timed out');
err = new BaseError('Operation timed out');
} else {

@@ -177,2 +177,16 @@ err = this.checkError(test, err);

result.error = err;
if (!(err instanceof assert.AssertionError)) {
const assrt = {
className: test.className,
error: err,
methodName: test.methodName,
operator: 'throws',
message: err.message,
file: test.file,
text: '(unknown)',
line: AssertUtil.readFilePosition(err, test.file).line
}
AssertUtil.add(assrt);
}
}

@@ -179,0 +193,0 @@ } finally {

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