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

deadunit-core

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deadunit-core - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

2

package.json
{"name":"deadunit-core",
"description": "The core for deadunit - a dead-simple nestable unit testing library for javascript and node.js.",
"keywords": ["unit", "test", "testing", "javascript", "node", "deadunit", "asynchronous"],
"version":"3.0.1",
"version":"3.0.2",
"dependencies":{

@@ -6,0 +6,0 @@ "stack-trace":"0.0.7",

@@ -10,20 +10,2 @@ module.exports = function returnResults(unitTestObject, printLateEvents) {

var warningWritten = false
function warnAboutLateEvents() {
if(!warningWritten) {
unitTestObject.mainTester.mainTester.mainTestState.unhandledErrorHandler(
'Test results were accessed before asynchronous parts of tests were fully complete'
+" If you have tests with asynchronous parts, make sure to use `this.count` to declare how many assertions you're waiting for."
)
warningWritten = true
}
}
function writeLateEvent(ended, eventToPrint) {
if(ended && printLateEvents) {
warnAboutLateEvents()
unitTestObject.mainTester.mainTester.mainTestState.unhandledErrorHandler(eventToPrint)
}
}
unitTestObject.events({

@@ -56,4 +38,2 @@ group: function(e) {

assert: function(e) {
writeLateEvent(ended,JSON.stringify(e))
e.type = 'assert'

@@ -64,4 +44,2 @@ groups[e.parent].results.push(e)

count: function(e) {
writeLateEvent(ended,JSON.stringify(e))
e.type = 'assert'

@@ -73,4 +51,2 @@ setGroupDuration(e.parent, e.time)

exception: function(e) {
writeLateEvent(ended,"Error: At time: "+e.time+" "+(e.error.stack?e.error.stack:e.error.toString()))
groups[e.parent].exceptions.push(e.error)

@@ -80,4 +56,2 @@ setGroupDuration(e.parent, e.time)

log: function(e) {
writeLateEvent(ended,JSON.stringify(e))
e.type = 'log'

@@ -84,0 +58,0 @@ groups[e.parent].results.push(e)

@@ -290,2 +290,3 @@ **Status**: API finalized, needs testing

* 3.0.2 - get rid of late events warning in deadunit-core (thats a job for deadunit proper)
* 3.0.1 - moving build-modules (which uses browserify) to be a devDependency

@@ -292,0 +293,0 @@ * 3.0.0

@@ -12,3 +12,2 @@ "use strict";

/*
this.test('simple success', function(t) {

@@ -91,3 +90,3 @@ this.count(3)

})
//*
this.test('Testing "Full deadunit test"', function() {

@@ -204,3 +203,3 @@ this.count(10)

this.ok(subtest3.file === "deadunitTests.js")
this.ok(subtest3.line === 99, subtest3.line)
this.ok(subtest3.line === 98, subtest3.line)
//this.ok(subtest3.column === 9, subtest3.column)

@@ -224,3 +223,3 @@

this.ok(subtest3.file === "deadunitTests.js")
this.ok(subtest3.line === 103, subtest3.line)
this.ok(subtest3.line === 102, subtest3.line)
//this.ok(subtest3.column === 9, subtest3.column)

@@ -496,3 +495,2 @@

})
*/

@@ -499,0 +497,0 @@

Sorry, the diff of this file is too big to display

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