๐Ÿ“ฆ antongolub / abstractest

Abstract testing processor

โ˜… 1 stars โ‘‚ 0 forks ๐Ÿ‘ 1 watching โš–๏ธ MIT License
testing
๐Ÿ“ฅ Clone https://github.com/antongolub/abstractest.git
HTTPS git clone https://github.com/antongolub/abstractest.git
SSH git clone git@github.com:antongolub/abstractest.git
CLI gh repo clone antongolub/abstractest
Anton Golub Anton Golub fix(native): handle malformed snapshot ctx 23a0b8a 2 years ago ๐Ÿ“ History
๐Ÿ“‚ 23a0b8a895f080f052554d216ac9c6aee308db6b View all commits โ†’
๐Ÿ“ .github
๐Ÿ“ .yarn
๐Ÿ“ packages
๐Ÿ“„ .gitignore
๐Ÿ“„ .releaserc.js
๐Ÿ“„ .yarnrc.yml
๐Ÿ“„ LICENSE
๐Ÿ“„ package.json
๐Ÿ“„ README.md
๐Ÿ“„ yarn.lock
๐Ÿ“„ README.md

abstractest

CI Maintainability
Abstract testing processor

Hypothesis

Find out if it's possible to declare unit tests in some generic notation, and execute them via any appropriate provider.

Usage

Install:
yarn add -D abstractest @abstractest/jest

Write a test:

// src/test/js/foo.test.js

import { describe, it, expect } from 'abstractest'

describe('foo()', () => {
  it('works as expected', () => {
    expect(foo()).toEqual('bar')
  })
})
Run tests via the required runner:
abstractest --runner=jest src/test/js/**/*.test.js

Contents

PackageDescriptionLatest
@abstractest/coreabstractest core utilsnpm (scoped)
@abstractest/expectAssertion library for abstractestnpm (scoped)
@abstractest/fixture-basic-testTesting fixtures
@abstractest/infraabstractest monorepo infra assets
@abstractest/jestJest runner for abstractestnpm (scoped)
@abstractest/nativeNative node:test runner for abstractestnpm (scoped)
@abstractest/typesabstractest typesnpm (scoped)
abstractestCLI for abstractestnpm (scoped)

Implementation notes

  • Does not provide whole module mocking by design. It's recommended to use some kind of di/ioc for this purpose.
  • Enforces ESM usage. Declare explicit file extensions (.cjs, '.mjs', '.mts', etc) to get necessary module context or initialize the legacy CommonJS API in place.

License

MIT