• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

digidem / multi-core-indexer / 8251601778
100%

Build:
DEFAULT BRANCH: main
Ran 12 Mar 2024 03:35PM UTC
Jobs 2
Files 5
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Mar 2024 03:34PM UTC coverage: 100.0%. Remained the same
8251601778

push

github

web-flow
chore: switch from tap to node:test and Borp (#39)

To do this, I:

- Uninstalled `tap` and replaced it with `borp`
- Used `c8` for test coverage
  - This changed the way coverage was detected around the `??=`
    operator, so I had to write an additional unit test
- Wrote a [jscodeshift] codemod (below)
- Dropped Node 16 support, which `node:test` requires
- Made a few small manual tweaks

Here's the jscodeshift transformer:

```typescript
import type {
  Transform,
  Expression,
  FunctionExpression,
  ArrowFunctionExpression,
} from 'jscodeshift'

const isFunctionExpression = (
  expression: Readonly<Expression>
): expression is FunctionExpression | ArrowFunctionExpression =>
  expression.type === 'FunctionExpression' ||
  expression.type === 'ArrowFunctionExpression'

const transform: Transform = (fileInfo, api) => {
  const { j } = api
  const root = j(fileInfo.source)

  // Update imports

  {
    const commonJsImport = (varName: string, moduleName: string) =>
      j.variableDeclaration('const', [
        j.variableDeclarator(
          j.identifier(varName),
          j.callExpression(j.identifier('require'), [
            j.stringLiteral(moduleName),
          ])
        ),
      ])

    const tapImport = root.find(j.VariableDeclaration, {
      declarations: [
        {
          init: {
            callee: { name: 'require' },
            arguments: [
              {
                value: 'tap',
              },
            ],
          },
        },
      ],
    })

    tapImport.insertBefore(commonJsImport('test', 'node:test'))
    tapImport.insertBefore(commonJsImport('assert', 'node:assert/strict'))

    tapImport.remove()
  }

  // Drop args from test callback

  root
    .find(j.CallExpression, { callee: { name: 'test' } })
    .forEach((callExpression) => {
      for (const arg of callExpression.value.arguments) {
        if (!isFunctionExpression(arg)) continue
... (continued)

191 of 191 branches covered (100.0%)

Branch coverage included in aggregate %.

16 of 16 new or added lines in 4 files covered. (100.0%)

833 of 833 relevant lines covered (100.0%)

12881.21 hits per line

Jobs
ID Job ID Ran Files Coverage
1 8251601778.1 12 Mar 2024 03:35PM UTC 5
100.0
GitHub Action Run
2 8251601778.2 12 Mar 2024 03:35PM UTC 5
100.0
GitHub Action Run
Source Files on build 8251601778
  • Tree
  • List 5
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 9b81ec15 on github
  • Prev Build on main (#8010774873)
  • Next Build on main (#8269019245)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc