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

tst

Package Overview
Dependencies
Maintainers
3
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tst - npm Package Compare versions

Comparing version 3.2.0 to 3.3.0

3

assert.js

@@ -81,5 +81,8 @@ import fastDeepEqual from 'fast-deep-equal'

equal as eq,
equal as is,
notEqual as neq,
notEqual as isnt,
notEqual as isNot,
deepEqual as deq,
throws as err
}

23

index.js

@@ -1,3 +0,5 @@

import * as assert from './assert.js'
let assert = require('./assert.js')
const isNode = typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]'
function Test(o) {

@@ -8,5 +10,3 @@ Object.assign(this, o)

Test.prototype.run = async function run () {
let from = this.startTime = performance.now()
await this.fn(this)
this.endTime = performance.now() - from
}

@@ -55,4 +55,2 @@ Object.assign(Test.prototype, {

const isNode = typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]'
export function log (ok, operator, msg, info = {}) {

@@ -62,3 +60,3 @@ assertIndex += 1

current.assertion.push({ idx: assertIndex, msg })
console.log(`%c ✔ ${assertIndex} — ${msg}`, 'color: #229944')
console.log(`${ isNode ? '' : '%c'}✔ ${assertIndex} — ${msg}`, 'color: #229944')
passed += 1

@@ -73,3 +71,3 @@ } else {

let ondone, hasOnly = false, running = false
let ondone, only = 0, running = false

@@ -82,3 +80,3 @@

Promise.resolve().then(() => {
hasOnly = tests.some(test => test.only)
tests.forEach(test => test.only && only++)

@@ -94,3 +92,3 @@ dequeue()

if (hasOnly && !test.only) {
if (only && !test.only) {
// in only-run - ignore tests

@@ -102,3 +100,3 @@ skipped += 1

if (test.skip) {
console.log(`%c# skip ${test.name}`, 'color: #ddd')
console.log(`${isNode ? '' : '%c'}# skip ${test.name}`, 'color: #ddd')
skipped += 1

@@ -126,5 +124,6 @@ return dequeue()

// summarise
console.log(`---`)
const total = passed + failed + skipped
console.log(`---\n# tests ${total}`)
if (hasOnly) console.log(`# only ${total - skipped}`)
if (only) console.log(`# only ${only} cases`)
console.log(`# total ${ total }`)
if (passed) console.log(`# pass ${passed}`)

@@ -131,0 +130,0 @@ if (failed) console.log(`# fail ${failed}`)

{
"name": "tst",
"description": "Testing tool",
"version": "3.2.0",
"version": "3.3.0",
"repository": "dy/tst",

@@ -6,0 +6,0 @@ "author": "Dmitry Yv",

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