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 4.0.0 to 4.1.0

7

assert.js

@@ -1,2 +0,3 @@

import { deepEqual as fastDeepEqual } from 'fast-equals'
import deq from 'dequal'
// TODO: same (members)

@@ -42,3 +43,3 @@ // TODO: almost

export function deepEqual (a, b, msg = 'should deep equal') {
this.log(fastDeepEqual(a, b), 'deepEqual', msg, {
this.log(deq(a, b), 'deepEqual', msg, {
actual: a,

@@ -50,3 +51,3 @@ expected: b

export function is(a, b, msg = 'should be the same') {
this.log(fastDeepEqual(a, b), 'is', msg, {
this.log(deq(a, b), 'is', msg, {
actual: a,

@@ -53,0 +54,0 @@ expected: b

@@ -27,2 +27,3 @@ import * as assert from './assert.js'

this.fn = null
this.tag = ''

@@ -76,21 +77,21 @@ Object.assign(this, o)

test.todo = function (name, fn) {
return new Test({ name: name + ' [todo]', fn, todo: true })
return new Test({ name, fn, todo: true, tag: 'todo' })
}
test.fixme = test.fix = function (name, fn) {
return new Test({ name: name + ' [fixme]', fn, todo: true })
return new Test({ name, fn, todo: true, tag: 'fixme' })
}
test.skip = function (name, fn) {
return new Test({ name: name + ' [skip]', fn, skip: true })
return new Test({ name, fn, skip: true, tag: 'skip' })
}
test.only = function (name, fn) {
return new Test({ name: name + ' [only]', fn, only: true })
return new Test({ name, fn, only: true, tag: 'only' })
}
test.node = function (name, fn) {
return new Test({ name: name + ' [node]', fn, skip: !isNode })
return new Test({ name: name, fn, skip: !isNode, tag: 'node' })
}
test.browser = function (name, fn) {
return new Test({ name: name + ' [browser]', fn, skip: isNode })
return new Test({ name: name, fn, skip: isNode, tag: 'browser' })
}
test.demo = function (name, fn) {
return new Test({ name: name + ' [demo]', fn, demo: true })
return new Test({ name, fn, demo: true, tag: 'demo' })
}

@@ -121,4 +122,4 @@

isNode ?
console.log(`× skip ${test.name}`) :
console.log(`%c↪️ ${test.name}`, 'color: #ddd')
console.log(`≫ skip ${test.name}` + (test.tag ? ` [${test.tag}]` : '')) :
console.log(`%c${test.name} ≫` + (test.tag ? ` [${test.tag}]` : ''), 'color: #dadada')
skipped += 1

@@ -128,3 +129,4 @@ return dequeue()

if (test.todo) {
console.log(`🚧 ${test.name}`)
isNode ? console.log(`≫ ${test.name}` + (test.tag ? ` [${test.tag}]` : '')) :
console.log(`%c${test.name} 🚧` + (test.tag ? ` [${test.tag}]` : ''), 'color: #dadada')
return dequeue()

@@ -135,4 +137,4 @@ }

current = test
isNode ? console.log(`▶ ${test.name}`) :
console.group(test.name)
isNode ? console.log(`▶ ${test.name}` + (test.tag ? ` [${test.tag}]` : '')) :
console.group(test.name + (test.tag ? ` [${test.tag}]` : ''))
await test.run()

@@ -139,0 +141,0 @@ console.groupEnd()

{
"name": "tst",
"description": "Tape-compatible test runner",
"version": "4.0.0",
"version": "4.1.0",
"repository": "dy/tst",

@@ -9,6 +9,7 @@ "author": "Dmitry Yv",

"module": "index.js",
"type": "module",
"license": "MIT",
"scripts": {
"test": "node -r esm test.js",
"start": "es-dev-server --node-resolve --dedupe --watch"
"test": "node test.js",
"start": "es-dev-server --node-resolve --dedupe"
},

@@ -20,5 +21,5 @@ "devDependencies": {

"dependencies": {
"fast-equals": "^2.0.0",
"dequal": "^1.0.0",
"wait-please": "^2.0.1"
}
}
# tst
* tape-compatible
* async
* async functions
* `t.todo`, `t.fixme` - broken/unfinished
* `t.node`, `t.browser` - target env tests
* `t.demo` - demo-run (can fail)
* `t.silent` - no
* inspectable logs
* inspectable errors
* correct stacktrace with sourcemaps

@@ -11,0 +10,0 @@ * `is` assert <!-- almost, same -->

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