Skip to content

v0.11.0

Latest

Choose a tag to compare

@github-actions github-actions released this 16 Nov 23:26
· 2 commits to main since this release
Immutable release. Only release title and notes can be modified.
3cbdb79

Minor Changes

  • #139 bf0bb70 - Support Cypress 10.0 and newer, from 12.0, and WebdriverIO 7.0 and newer, from 8.0: comparing the fixtures with Cypress 10.11.0 and 11.2.0 and WebdriverIO 7.40.0 running them found no difference, and their test syntax is the same. Cypress before 10 kept its config in cypress.json, which the scan doesn't read.

  • #137 51f3376 - Support Cypress 12.0 and newer, from 13.0, and WebdriverIO 8.0 and newer, from 9.0: their syntax is the same, and comparing the fixtures with Cypress 12.17.4 and WebdriverIO 8.46.0 running them found no difference. Projects on them got an unsupported-framework-version warning.

  • #141 ddd192b - Support Jasmine 3.0 and newer, from 4.0: Jasmine 3 still has about a million weekly downloads of jasmine-core, and projects on it got an unsupported-framework-version warning. Read from jasmine-core 3.99.1 and 4.0.0, it, fit, xit and describe check their functions the same way, and comparing the risk fixture with Jasmine 3.99.0 running it found no difference. Jasmine 3's reports give no spec file, so the comparison runs each spec file on its own.

  • #137 51f3376 - Support Jest 27.0 and newer, from 29.0: about a third of the popular projects that use Jest are on 26 to 28, which the scan read with a warning that the version wasn't supported. Read from jest-circus 27.5 and 28.0, the chains are those of Jest 29 but for .failing, which is an invalid-chain error before Jest 28, as the call throws and Jest fails the file. Checked against Jest 27.5.1 and 28.1.3 running the settlement fixture, with .each case titles.

  • #142 130da5f - Support Playwright 1.31 and newer, from 1.42: about 3.7 million weekly downloads of @playwright/test are on 1.31 to 1.41, and projects on them got an unsupported-framework-version warning. Before 1.42 the scan follows what those versions do, read from their source and checked by running them: a describe with details throws, so the file fails to load (invalid-chain); a test with details is listed without their tags and fails when it runs (an invalid-chain warning); test.fail(title, body), and test.skip(), fixme() or fail() with details, declare no test and apply to every test in the scope (skip-without-body); a test without a body loads and fails when it runs (a test-without-body warning); and a test has only the tags of its own title, as Playwright's report gives them. Comparing the fixtures with Playwright 1.31.2, 1.34.3, 1.38.1 and 1.41.2 found no difference beyond the files that fail to load, and none on a copy whose describes have no details, except the state a describe's test.fail() sets, which --list shows only from 1.38 and a run applies in each. Playwright 1.30 and older keep the tests of a file that fails to load, so they stay unsupported.

  • #133 0b4265d - --format commands prints, in place of the inventory, a command line for each config that runs the tests kept, with the projects that run them, as npx playwright test tests/orders/limit-orders.spec.ts --config playwright.config.ts --project chromium webkit; with --related, the tests a change can affect. Each runner gets the files the way it takes them: Jest exact paths with --runTestsByPath, Cypress one command for each testing type, Bun paths that start with ./. Mocha adds files named on its command line to its config's spec, so a # line above its command says that every spec the config lists runs too. runCommands() gives the same commands from the library.

  • #128 5491e0d - Each test has unfollowedDependencies: the file and line of each place it reaches that the scan can't follow, as support/venues.ts:2, sorted, beside hasUnfollowedDependencies. A test that --related keeps for such a place now says where, so a reader or an agent can judge whether a change could be what that place loads; one dynamic import in a shared setup file or a config setting the scan can't work out often marks a whole suite. --fields can pick it. diff ignores the list, as it ignores line numbers; hasUnfollowedDependencies still shows a test that starts or stops reaching such code. Inventories saved by earlier versions don't have the key, so scan both revisions again with this version before comparing them.

  • #138 6b4960a - Support Vitest 1.0 and newer, from 3.0: Vitest 2 and 1 still have about 15 million weekly downloads, and projects on them got an unsupported-framework-version warning. Read from @vitest/runner 1.6.1, 2.0.0, 2.1.9 and 3.0.9, their chains are those of Vitest 3 but for .for: test.for came in 2.0 and describe.for in 3.0, and before, each is an invalid-chain error, as the call throws and Vitest fails the file. Compared with Vitest 1.6.1, 2.0.5 and 2.1.9 running the strategy fixture: no other difference.

Patch Changes

  • #140 edea139 - Keep a backslash in a file name on Linux and macOS, where it is no folder separator: a fixture named file \slash.js failed the whole scan with ENOENT.

  • #143 c62d7ee - Read test(title, checkFill, 10_000), a body passed by name before a timeout, as a call shaped like a test, as test(title, () => {}, 10_000) already was. A test object a local module exports again was followed to that module only after such a call, so when it was the file's first test through that name, it declared nothing, without a warning.

  • #127 b32cc66 - Follow a module loaded by a path built from string literals and the module's own folder, as require(path.join(__dirname, 'venues', 'nasdaq.cjs')), import(pathToFileURL(resolve(SUPPORT, 'venues/nyse.ts')).href) or import(fileURLToPath(new URL('../support/feeds.mjs', import.meta.url))), also through constants, instead of reporting it as worked out at run time. __dirname, __filename and import.meta.dirname, filename and url are read with path.join(), path.resolve() with an absolute part, path.dirname(), new URL(), fileURLToPath() and pathToFileURL().

  • #134 541ed66 - Follow a describe function a local CommonJS module takes from its runner and exports again, as module.exports = { describe, it } after const { describe, it } = require('@jest/globals'), and one it exports under another name, as module.exports.suite = describe. The module was reported as exporting no test object, so describe.skip there didn't skip its tests and their suite was missing.

  • #123 cea05e7 - Read a config that calls a function it declares or imports by name from a local file, as export default createVitestConfig('node'), as what that function returns. Without globs, also find the files a package.json script's config runs when no config found by name runs them, or the one there can't be read. The AI SDK repository, whose packages are configured this way, now scans as 19,693 tests instead of 1,186.

  • #122 f8f4a09 - Read a config factory with its parameters set from the call's arguments, their defaults and destructuring included, as configureE2e({ port: 3002 }) or module.exports = buildConfig(__dirname, { testRegex }), and follow one a workspace package exports, a default or CommonJS export, or one passed on from another module. A default written with ??, || or &&, as options ?? {}, is read when its left side is known.

  • #132 ca1e007 - Follow a setup file a config names with require.resolve('./global-setup.js') or import.meta.resolve('./global-setup.ts'), also through constants and path.join(), as Jest's globalSetup, globalTeardown, setupFiles and setupFilesAfterEnv and Vitest's setupFiles and globalSetup often are, instead of reporting it as worked out at run time, which marked every test of the suite hasUnfollowedDependencies. require.resolve() of a package reads as the package's name, as it would written directly; a path that isn't there still can't be worked out.

  • #129 8111fd9 - With expandCases, stop reporting a Playwright file as failing to load with a duplicate-title error when a loop's describe title mixes the loop variable with a value the scan can't work out, as test.describe(`${process.env.TRADING_REGION} ${desk} desk`, ...). Its source text was the same on every pass, so every test in the file was listed as notLoaded, while Playwright's titles differ and it loads the file.

  • #122 f8f4a09 - Read it.only.bind(it) and a test function's other own Function methods, call and apply, as plain calls instead of invalid-chain errors saying the runner stops before it runs any test.

  • #143 c62d7ee - Follow a test function a local module exports again, as module.exports = { test } after require('@jest/globals') or export { test } from 'vitest', when a condition or a function chooses it, as in return open ? test : test.skip or (isCI ? it : it.skip)('title', fn). The bare name was followed to its module only in a call shaped like a test, so when it came first in such a choice, the call declared no test, without a warning. Playwright already followed it.

  • #131 3e5435e - Report a framework-mismatch at the call to a helper whose test object comes from another of the project's modules that builds it from another runner's package, as import { test } from './fixtures' where the fixtures extend @playwright/test, instead of an internal-error for the whole file.

  • #129 8111fd9 - Follow a helper called on the module that exports it, as checks.validatesQuantity('buy') after import * as checks from './checks' or const checks = require('./checks'), instead of leaving out the tests it declares without a warning.

  • #122 f8f4a09 - Report another framework a helper's module imports at the helper's call only when the helper uses what it imports, instead of an error saying the scanned file imports it, as when a Bun test builds data with a function from a module of shared helpers that also imports @playwright/test.

  • #129 8111fd9 - Bind a helper's rest parameter, as ...cycles in settlesIn('equities', 'T+1', 'T+2'), to the arguments left, so a loop over it is counted and expanded and titles built from it are worked out. A spread argument still leaves it unknown.

  • #122 f8f4a09 - Read a var declared in a nested block, such as a switch case or an if block, as belonging to its whole function, as JavaScript hoists it, so a local var context no longer reads as Mocha's context and reports an invalid-chain error, as in a canvas helper that calls context.drawImage().

  • #127 b32cc66 - Take a package.json imports target in build output, as "#src/*.js": "./build/*.js", from the source next to it, as src/context/empty.ts, as workspace packages already are, instead of reporting the import as not read when the project hasn't been built.

  • #140 edea139 - Read an absolute Vitest includeSource entry that names the config's root itself, as includeSource: [resolve(__dirname, './test')] with root: './test', as matching no file, as Vitest does, instead of failing the scan with picomatch's TypeError.

  • #129 8111fd9 - Follow a test function or describe imported from a local file whatever the title of the call that uses it first, as test(TITLES.fill, fn) with test from a fixtures file, or describe(DESK, fn) with Vitest's describe re-exported by a local module. Such a call was left out, and the tests in such a describe lost it, unless an earlier call in the file wrote its title in place.

  • #126 ec9af13 - Without patterns, find the files Mocha runs from package.json scripts: a script that starts mocha, _mocha or ts-mocha, also through the coverage tools nyc, c8 or mcr, runs the specs its command line gives, joined with the spec that remains, with the .mocharc and mocha key found from the script's folder, unless --no-config or --no-package leave them out, and its --spec, --extension, --ignore, --file, --recursive and --ui over the config's. Before, only a config in the root or Mocha's defaults there decided which files ran, so projects that give Mocha its files on the command line, as mocha 'src/**/*.spec.ts', or keep a .mocharc in each package, found none.

  • #140 edea139 - Follow an import written inside a TypeScript declare module block, or inside a block as the reify loader allows, for dependencyHash, instead of an internal-error for the file.

  • #120 4e1341d - Read Jest configs built with next/jest's createJestConfig(config), as the Next.js guide writes them, with the mocks and ignored folders next/jest adds, so their test files are found and their imports followed. Leave out a name Jest's moduleNameMapper maps to an installed package, such as identity-obj-proxy, as an imported package is, instead of reporting it as unfollowed.

  • #135 dc581f1 - --format commands and runCommands() put [, ], *, ?, { and } in a node:test path in brackets, as test/routes/[[]venue[]]/quotes.test.js: node --test reads its arguments as globs, so a route folder such as [venue] ran another file, or none.

  • #136 dd7e35e - Without patterns, node:test files are also found through the node --test scripts of each package.json below the root, run from its folder, as a monorepo's packages run their own; before, only the root's scripts counted, and a root script that named its own files hid every package's tests.

  • #131 3e5435e - Read the runner version from an npm 5 lockfile that records a package's tarball, as "version": "https://registry.npmjs.org/jest/-/jest-20.0.4.tgz", instead of failing the scan with a TypeError; a locked git dependency now falls through to the version package.json declares.

  • #134 541ed66 - Work out a property of an object on its own, as TITLES.fill when TITLES also holds a function, or fees.MINIMUM on a module loaded with const fees = require('./fees') that also exports a value the scan can't work out. One such value made every property of the object unknown, so titles, tables and tags read from it kept their source text.

  • #122 f8f4a09 - Follow a workspace package whose exports point to build output, as ./dist/node.js, to its TypeScript source in the package folder, as node.ts, when it has no src folder, as n8n's shared Vitest config package does.

  • #119 a61bef5 - Keep Playwright test candidates from readable top-level file settings when runtime project construction prevents exact discovery. Mark incomplete discovery as an error with unknown project membership, and follow package-script configs for files without an ancestor config.

  • #122 f8f4a09 - Read playwright.chromium.launch(), playwright.request.newContext() and the other @playwright/test exports called through a default or CommonJS import of the package as library calls, as defineConfig already was, instead of invalid-chain errors that could mark the file's tests as not loaded.

  • #129 8111fd9 - Read Playwright's test.skip, test.fixme and test.fail with a body passed by name as a test, as in test.skip('applies the short-sale rule on ' + venue, checkShortSale). With a title the scan couldn't work out, the call was read as test.skip(condition, description): the test was missing and the other tests of its describe were listed as skipped under that condition.

  • #140 edea139 - Read the runner version from its own entry in pnpm-lock.yaml when an override such as vitest@5.0.0>happy-dom comes first, instead of failing the scan with a TypeError.

  • #122 f8f4a09 - Say that Cypress, WebdriverIO and Jasmine configs are read only in the root when a scan without patterns finds none there, and name the nearest folder below the root that has one, instead of saying no config is in the root or a folder below it.

  • #122 f8f4a09 - Report a file that imports its test functions from another runner's built-in module, as bun:test in a node:test or Jest scan, or node:test in a Vitest, Jest, Mocha, Jasmine or Playwright scan, as a framework-mismatch, as for other runners' packages, instead of an unresolved-test-import error saying the module is not a local file. mocha is a mismatch in Jest, Vitest and Playwright scans too. A module the config's alias maps to a local file, as a shim of bun:test that Vitest runs, is followed as before.

  • #122 f8f4a09 - Find the runner a package.json script starts past xvfb-run and xvfb-maybe, as browser tests start on Linux, and read Currents' pwc and pwc-p as Playwright and its cypress-cloud as Cypress, with the config options they pass on. A word quoted in part, as --server-args="-screen 0 1280x1024x24", is now one word, as the shell reads it.

  • #122 f8f4a09 - Report a test object that local files build from or re-export from another runner's module, as @playwright/test fixtures imported by a file a Jest config runs, as a framework-mismatch that names the chain, instead of an unresolved-test-import error saying the module is not a local file.

  • #122 f8f4a09 - Report a file whose expressions nest more than 1,000 deep, as a chain of thousands of + or calls, as a parse-error, as brackets nested more than 500 deep already are, instead of an internal-error when the scan's walk overflows the stack. The deepest of 447,597 test files in 2,500 popular projects nests 270.

  • #143 c62d7ee - Tests a helper registers when it is called from a describe in a function nothing in the file calls get the test-in-function warning, as the tests written in that function do: the runner registers none of them until that function is called, and they were listed as if it did. A helper in the same file is listed where it is written, the same whether it comes before or after that function; before, one written after it was listed at the call without a warning, and one written before it was listed in both places. An imported helper is listed at the call, with the warning.

  • #143 c62d7ee - Keep a file loaded when a call the runner refuses, such as a Jest describe.each([]), is inside a describe in a function nothing in the file calls, or in a helper called only from such a function. A describe resets what the scan knows about the function around it, so the call was taken to run while the file loads, and every test in the file was notLoaded. It is still reported, as one in a helper body or under a condition is.

  • #130 7e73c98 - Without patterns, keep candidate files for a Vitest config whose project list the scan can't read, as one built with readdirSync, a function in test.projects or Vitest 3's test.workspace: the files the config's own include and exclude select, with their tests' projects null and a config-value-unknown error that says tests may be missing, as Playwright does. Unknown file selection in Vitest discovery is now an error, as in Playwright's. The entries of a test.exclude the scan can read still leave files out beside a spread it can't work out, with a warning, as Jest's ignore patterns do; a browser.enabled it can't work out leaves the config's files listed; a Vitest 3 test.workspace the scan doesn't read gets a warning where test is written; and workspace: undefined counts as no workspace, as Vitest reads it.

  • #126 ec9af13 - Without patterns, list the files of a Vitest browser config whose instance's browser or name the scan can't work out, as instances: [{ browser: process.env.TEST_BROWSER || 'chromium' }], with their tests' projects null and a warning, instead of finding no files: the instances only name the projects.

  • #127 b32cc66 - Follow a workspace package written in JavaScript to its files, as Node loads them: a main or exports that points to JavaScript outside build folders, as ./index.js, and a file the package has no exports for, as @lhci/utils/src/presets/all.js. Tests that import such a package were marked hasUnfollowedDependencies, so --related kept them for a change to any file, and their dependencyHash did not change with the package's code. Built JavaScript with no source next to it is still not followed.

  • #122 f8f4a09 - Follow an import of a file in a workspace package that has no exports, as @trading/e2e/fixtures.ts, to that file, as Node does, instead of reporting the package as not pointing to TypeScript source.

  • #121 c9359e2 - Read a test or describe whose function a wrapper call receives, as in test('fills an order', withBroker(async () => {})): the tests inside such a describe were missing without a diagnostic, and such a test had a null bodyHash, so a diff missed edits to it, and an expectCount of 0. The function's parameters are the wrapper's, so they are not read as fixtures.