Socket
Socket
Sign inDemoInstall

ava

Package Overview
Dependencies
Maintainers
2
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ava - npm Package Compare versions

Comparing version 6.1.1 to 6.1.2

4

lib/assert.js

@@ -420,2 +420,3 @@ import {isNativeError} from 'node:util/types';

let retval;
let threw = false;
let actual = null;

@@ -433,6 +434,7 @@ try {

} catch (error) {
threw = true;
actual = error;
}
if (!actual) {
if (!threw) {
throw fail(new AssertionError(message, {

@@ -439,0 +441,0 @@ assertion: 't.throws()',

@@ -384,3 +384,5 @@ import fs from 'node:fs';

try {
globs = normalizeGlobs({files: conf.files, ignoredByWatcher: conf.watchMode?.ignoreChanges, extensions, providers});
globs = normalizeGlobs({
files: conf.files, ignoredByWatcher: conf.watchMode?.ignoreChanges, extensions, providers,
});
} catch (error) {

@@ -387,0 +389,0 @@ exit(error.message);

@@ -14,5 +14,3 @@ const chainRegistry = new WeakMap();

function extendChain(previous, name, flag) {
if (!flag) {
flag = name;
}
flag ||= name;

@@ -93,3 +91,5 @@ const fn = (...args) => {

root.todo = startChain('test.todo', fn, {...defaults, type: 'test', todo: true});
root.serial.todo = startChain('test.serial.todo', fn, {...defaults, serial: true, type: 'test', todo: true});
root.serial.todo = startChain('test.serial.todo', fn, {
...defaults, serial: true, type: 'test', todo: true,
});

@@ -96,0 +96,0 @@ root.macro = options => {

@@ -51,3 +51,5 @@ import v8 from 'node:v8';

const {conf, providers} = await configCache.get(projectDir);
return buildGlobs({conf, providers, projectDir, overrideExtensions, overrideFiles});
return buildGlobs({
conf, providers, projectDir, overrideExtensions, overrideFiles,
});
};

@@ -54,0 +56,0 @@

@@ -38,3 +38,3 @@ import fs from 'node:fs';

if (configFile) {
configFile = path.resolve(configFile); // Relative to CWD
return path.resolve(configFile); // Relative to CWD
}

@@ -157,3 +157,5 @@

const config = {...defaults, nonSemVerExperiments: {}, ...fileConf, ...packageConf, projectDir, configFile};
const config = {
...defaults, nonSemVerExperiments: {}, ...fileConf, ...packageConf, projectDir, configFile,
};

@@ -160,0 +162,0 @@ const {nonSemVerExperiments: experiments} = config;

@@ -241,3 +241,3 @@ import {EventEmitter, on} from 'node:events';

} catch (error) {
fatal = fatal ?? error;
fatal ??= error;
} finally {

@@ -244,0 +244,0 @@ if (fatal !== undefined) {

@@ -223,3 +223,5 @@ import {Buffer} from 'node:buffer';

return {version, compressed, sha256sumOffset, compressedOffset};
return {
version, compressed, sha256sumOffset, compressedOffset,
};
}

@@ -294,7 +296,3 @@

recordSerialized({data, label, belongsTo, index}) {
let block = this.newBlocksByTitle.get(belongsTo);
if (!block) {
block = {snapshots: []};
}
const block = this.newBlocksByTitle.get(belongsTo) ?? {snapshots: []};
const {snapshots} = block;

@@ -324,3 +322,5 @@

this.hasChanges = true;
this.recordSerialized({data, label, belongsTo, index});
this.recordSerialized({
data, label, belongsTo, index,
});
};

@@ -344,8 +344,4 @@ }

const oldBlock = this.oldBlocksByTitle.get(belongsTo);
let snapshot = oldBlock?.snapshots[index];
const snapshot = oldBlock?.snapshots[index] ?? {};
if (!snapshot) {
snapshot = {};
}
// Retain the label from the old snapshot, so as not to assume that the

@@ -352,0 +348,0 @@ // snapshot.skip() arguments are well-formed.

@@ -5,3 +5,5 @@ import concordance from 'concordance';

import {AssertionError, Assertions, checkAssertionMessage, getAssertionStack} from './assert.js';
import {
AssertionError, Assertions, checkAssertionMessage, getAssertionStack,
} from './assert.js';
import concordanceOptions from './concordance-options.js';

@@ -281,3 +283,5 @@ import nowAndTimers from './now-and-timers.cjs';

const errors = error ? [error] : [];
return {assertCount, deferredSnapshotRecordings, errors, logs, passed, snapshotCount, startingSnapshotCount};
return {
assertCount, deferredSnapshotRecordings, errors, logs, passed, snapshotCount, startingSnapshotCount,
};
};

@@ -284,0 +288,0 @@

@@ -10,3 +10,5 @@ import fs from 'node:fs';

import {chalk} from './chalk.js';
import {applyTestFileFilter, classify, buildIgnoreMatcher, findTests} from './globs.js';
import {
applyTestFileFilter, classify, buildIgnoreMatcher, findTests,
} from './globs.js';
import {levels as providerLevels} from './provider-manager.js';

@@ -38,3 +40,5 @@

providers = providers.filter(({level}) => level >= providerLevels.ava6);
for await (const {files, ...runtimeOptions} of plan({api, filter, globs, projectDir, providers, stdin, abortSignal: signal})) {
for await (const {files, ...runtimeOptions} of plan({
api, filter, globs, projectDir, providers, stdin, abortSignal: signal,
})) {
await api.run({files, filter, runtimeOptions});

@@ -67,3 +71,5 @@ reporter.endRun();

const stats = fileStats(path);
return {path, isTest, exists: stats !== undefined, isFile: stats?.isFile() ?? false};
return {
path, isTest, exists: stats !== undefined, isFile: stats?.isFile() ?? false,
};
};

@@ -70,0 +76,0 @@

{
"name": "ava",
"version": "6.1.1",
"version": "6.1.2",
"description": "Node.js test runner that lets you develop with confidence.",

@@ -141,3 +141,3 @@ "license": "MIT",

"typescript": "~5.3.3",
"xo": "^0.56.0",
"xo": "^0.57.0",
"zen-observable": "^0.10.0"

@@ -144,0 +144,0 @@ },

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