Repository navigation
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 incypress.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 anunsupported-framework-versionwarning. -
#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 anunsupported-framework-versionwarning. Read from jasmine-core 3.99.1 and 4.0.0,it,fit,xitanddescribecheck 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 fromjest-circus27.5 and 28.0, the chains are those of Jest 29 but for.failing, which is aninvalid-chainerror 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.eachcase titles. -
#142
130da5f- Support Playwright 1.31 and newer, from 1.42: about 3.7 million weekly downloads of@playwright/testare on 1.31 to 1.41, and projects on them got anunsupported-framework-versionwarning. 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 (aninvalid-chainwarning);test.fail(title, body), andtest.skip(),fixme()orfail()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 (atest-without-bodywarning); 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'stest.fail()sets, which--listshows 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 commandsprints, in place of the inventory, a command line for each config that runs the tests kept, with the projects that run them, asnpx 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'sspec, 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 hasunfollowedDependencies: the file and line of each place it reaches that the scan can't follow, assupport/venues.ts:2, sorted, besidehasUnfollowedDependencies. A test that--relatedkeeps 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.--fieldscan pick it.diffignores the list, as it ignores line numbers;hasUnfollowedDependenciesstill 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 anunsupported-framework-versionwarning. Read from@vitest/runner1.6.1, 2.0.0, 2.1.9 and 3.0.9, their chains are those of Vitest 3 but for.for:test.forcame in 2.0 anddescribe.forin 3.0, and before, each is aninvalid-chainerror, 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 namedfile \slash.jsfailed the whole scan withENOENT. -
#143
c62d7ee- Readtest(title, checkFill, 10_000), a body passed by name before a timeout, as a call shaped like a test, astest(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, asrequire(path.join(__dirname, 'venues', 'nasdaq.cjs')),import(pathToFileURL(resolve(SUPPORT, 'venues/nyse.ts')).href)orimport(fileURLToPath(new URL('../support/feeds.mjs', import.meta.url))), also through constants, instead of reporting it as worked out at run time.__dirname,__filenameandimport.meta.dirname,filenameandurlare read withpath.join(),path.resolve()with an absolute part,path.dirname(),new URL(),fileURLToPath()andpathToFileURL(). -
#134
541ed66- Follow a describe function a local CommonJS module takes from its runner and exports again, asmodule.exports = { describe, it }afterconst { describe, it } = require('@jest/globals'), and one it exports under another name, asmodule.exports.suite = describe. The module was reported as exporting no test object, sodescribe.skipthere 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, asexport 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, asconfigureE2e({ port: 3002 })ormodule.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&&, asoptions ?? {}, is read when its left side is known. -
#132
ca1e007- Follow a setup file a config names withrequire.resolve('./global-setup.js')orimport.meta.resolve('./global-setup.ts'), also through constants andpath.join(), as Jest'sglobalSetup,globalTeardown,setupFilesandsetupFilesAfterEnvand Vitest'ssetupFilesandglobalSetupoften are, instead of reporting it as worked out at run time, which marked every test of the suitehasUnfollowedDependencies.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- WithexpandCases, stop reporting a Playwright file as failing to load with aduplicate-titleerror when a loop's describe title mixes the loop variable with a value the scan can't work out, astest.describe(`${process.env.TRADING_REGION} ${desk} desk`, ...). Its source text was the same on every pass, so every test in the file was listed asnotLoaded, while Playwright's titles differ and it loads the file. -
#122
f8f4a09- Readit.only.bind(it)and a test function's other own Function methods,callandapply, as plain calls instead ofinvalid-chainerrors saying the runner stops before it runs any test. -
#143
c62d7ee- Follow a test function a local module exports again, asmodule.exports = { test }afterrequire('@jest/globals')orexport { test } from 'vitest', when a condition or a function chooses it, as inreturn open ? test : test.skipor(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 aframework-mismatchat the call to a helper whose test object comes from another of the project's modules that builds it from another runner's package, asimport { test } from './fixtures'where the fixtures extend@playwright/test, instead of aninternal-errorfor the whole file. -
#129
8111fd9- Follow a helper called on the module that exports it, aschecks.validatesQuantity('buy')afterimport * as checks from './checks'orconst 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...cyclesinsettlesIn('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 avardeclared in a nested block, such as aswitchcase or anifblock, as belonging to its whole function, as JavaScript hoists it, so a localvar contextno longer reads as Mocha'scontextand reports aninvalid-chainerror, as in a canvas helper that callscontext.drawImage(). -
#127
b32cc66- Take a package.jsonimportstarget in build output, as"#src/*.js": "./build/*.js", from the source next to it, assrc/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 VitestincludeSourceentry that names the config's root itself, asincludeSource: [resolve(__dirname, './test')]withroot: './test', as matching no file, as Vitest does, instead of failing the scan with picomatch'sTypeError. -
#129
8111fd9- Follow a test function or describe imported from a local file whatever the title of the call that uses it first, astest(TITLES.fill, fn)withtestfrom a fixtures file, ordescribe(DESK, fn)with Vitest'sdescribere-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 startsmocha,_mochaorts-mocha, also through the coverage toolsnyc,c8ormcr, runs the specs its command line gives, joined with thespecthat remains, with the.mocharcandmochakey found from the script's folder, unless--no-configor--no-packageleave them out, and its--spec,--extension,--ignore,--file,--recursiveand--uiover 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, asmocha 'src/**/*.spec.ts', or keep a.mocharcin each package, found none. -
#140
edea139- Follow an import written inside a TypeScriptdeclare moduleblock, or inside a block as the reify loader allows, fordependencyHash, instead of aninternal-errorfor the file. -
#120
4e1341d- Read Jest configs built with next/jest'screateJestConfig(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'smoduleNameMappermaps to an installed package, such asidentity-obj-proxy, as an imported package is, instead of reporting it as unfollowed. -
#135
dc581f1---format commandsandrunCommands()put[,],*,?,{and}in a node:test path in brackets, astest/routes/[[]venue[]]/quotes.test.js:node --testreads 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 thenode --testscripts of eachpackage.jsonbelow 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 aTypeError; 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, asTITLES.fillwhenTITLESalso holds a function, orfees.MINIMUMon a module loaded withconst 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, asnode.ts, when it has nosrcfolder, 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- Readplaywright.chromium.launch(),playwright.request.newContext()and the other@playwright/testexports called through a default or CommonJS import of the package as library calls, asdefineConfigalready was, instead ofinvalid-chainerrors that could mark the file's tests as not loaded. -
#129
8111fd9- Read Playwright'stest.skip,test.fixmeandtest.failwith a body passed by name as a test, as intest.skip('applies the short-sale rule on ' + venue, checkShortSale). With a title the scan couldn't work out, the call was read astest.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 inpnpm-lock.yamlwhen an override such asvitest@5.0.0>happy-domcomes first, instead of failing the scan with aTypeError. -
#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, asbun:testin a node:test or Jest scan, ornode:testin a Vitest, Jest, Mocha, Jasmine or Playwright scan, as aframework-mismatch, as for other runners' packages, instead of anunresolved-test-importerror saying the module is not a local file.mochais a mismatch in Jest, Vitest and Playwright scans too. A module the config's alias maps to a local file, as a shim ofbun:testthat Vitest runs, is followed as before. -
#122
f8f4a09- Find the runner a package.json script starts pastxvfb-runandxvfb-maybe, as browser tests start on Linux, and read Currents'pwcandpwc-pas Playwright and itscypress-cloudas 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/testfixtures imported by a file a Jest config runs, as aframework-mismatchthat names the chain, instead of anunresolved-test-importerror 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 aparse-error, as brackets nested more than 500 deep already are, instead of aninternal-errorwhen 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 thetest-in-functionwarning, 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 Jestdescribe.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 wasnotLoaded. 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 withreaddirSync, a function intest.projectsor Vitest 3'stest.workspace: the files the config's ownincludeandexcludeselect, with their tests'projectsnulland aconfig-value-unknownerror 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 atest.excludethe scan can read still leave files out beside a spread it can't work out, with a warning, as Jest's ignore patterns do; abrowser.enabledit can't work out leaves the config's files listed; a Vitest 3test.workspacethe scan doesn't read gets a warning wheretestis written; andworkspace: undefinedcounts as no workspace, as Vitest reads it. -
#126
ec9af13- Without patterns, list the files of a Vitest browser config whose instance'sbrowserornamethe scan can't work out, asinstances: [{ browser: process.env.TEST_BROWSER || 'chromium' }], with their tests'projectsnulland 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: amainorexportsthat points to JavaScript outside build folders, as./index.js, and a file the package has noexportsfor, as@lhci/utils/src/presets/all.js. Tests that import such a package were markedhasUnfollowedDependencies, so--relatedkept them for a change to any file, and theirdependencyHashdid 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 noexports, 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 intest('fills an order', withBroker(async () => {})): the tests inside such a describe were missing without a diagnostic, and such a test had a nullbodyHash, so a diff missed edits to it, and anexpectCountof 0. The function's parameters are the wrapper's, so they are not read as fixtures.