0.0.15 • Published 2 years ago
@xieyuheng/test-case v0.0.15
Test Case
Minimalist Test Framework for JavaScript/TypeScript.
Installation
npm install @xieyuheng/test-caseUsage
Command line tool
The command line program is called test-case.
test-case run lib/examples/number.case.jsExample
import { TestCase } from "@xieyuheng/test-case"
export default class extends TestCase {
  // NOTE Method name startsWith "test" will be viewed as a test
  test_add() {
    this.assertEquals(1 + 1, 2)
    this.assertNotEquals(1 + 1, 3)
  }
  "method name includes whitespace will be viewed as a test"() {
    this.assert(true)
  }
}Please see src/examples for more examples, including:
Subclassing
- Example subclassing: lexer-test-case.ts
- Example test case class: lexer.case.ts
Development
npm install    // Install dependencies
npm run build  // Compile `src/` to `lib/`
npm run watch  // Watch the compilation
npm run test   // Run testContributions
Be polite, do not bring negative emotion to others.
- TODO.md
- STYLE-GUIDE.md
- CODE-OF-CONDUCT.md
- When contributing, add yourself to AUTHORS