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

@charmander/test

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@charmander/test - npm Package Compare versions

Comparing version 0.4.0-pre.1 to 0.4.0-pre.2

16

index.js

@@ -33,2 +33,8 @@ 'use strict';

const checkNested = testGroup => {
if (testGroup._definingNested) {
throw new Error('Can’t modify a test group while a test inside it is being defined (did you remember to include `test` in its parameter list?)');
}
};
class TestGroup {

@@ -41,5 +47,7 @@ constructor(path) {

this.groups = [];
this._definingNested = false;
}
addTest(name, run) {
checkNested(this);
checkPush(this.tests, new TestItem([...this.path, name], run));

@@ -49,2 +57,4 @@ }

addSetup(name, run) {
checkNested(this);
if (run === undefined) {

@@ -59,2 +69,4 @@ run = name;

addTeardown(name, run) {
checkNested(this);
if (run === undefined) {

@@ -77,5 +89,9 @@ run = name;

checkNested(this);
const group = new TestGroup([...this.path, name]);
this.groups.push(group);
this._definingNested = true;
contents(group._boundAddTest());
this._definingNested = false;
}

@@ -82,0 +98,0 @@

15

internal/run.js

@@ -79,6 +79,17 @@ 'use strict';

let {pass, total} = summary;
forEach(
group.groups,
(group, callback) => {
run(output, group, callback);
run(output, group, (error, groupSummary) => {
if (error) {
callback(error);
return;
}
pass += groupSummary.pass;
total += groupSummary.total;
callback(null);
});
},

@@ -97,3 +108,3 @@ error => {

callback(null, summary);
callback(null, {pass, total});
});

@@ -100,0 +111,0 @@ }

2

package.json
{
"name": "@charmander/test",
"version": "0.4.0-pre.1",
"version": "0.4.0-pre.2",
"description": "Basic test organization",

@@ -5,0 +5,0 @@ "keywords": [

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