Core testing framework functionality for TSpec
ℹ️ Important Note
Provides the foundational testing APIs including
describe()
,test()
, and the test runner engine.This package is designed to work as part of the TSpec ecosystem and Typically used together with @tspec/assert for assertions.
npm install --save-dev @tspec/core @tspec/assert
- Test organization with
describe()
,test()
,it()
- Async testing support with promises and async/await
- Test file discovery and execution
- TypeScript-first design with full type safety
import { describe, test } from '@tspec/core';
import { expect } from '@tspec/assert';
describe('My Component', () => {
test('should work correctly', () => {
const result = myFunction();
expect(result).toBe('expected');
});
});
import { describe, test } from '@tspec/core';
import { expect } from '@tspec/assert';
describe('core Example', () => {
test('demonstrates core functionality', () => {
// Test organization and structure
const value = 'test';
expect(value).toBe('test');
});
});
TSpec is designed as a cohesive framework. Here are the related packages:
- @tspec/assert - Assertion library for TSpec testing framework
- @tspec/cli - Command-line interface for running TSpec tests
- 📖 Complete Documentation - Full usage guide and API reference
- 🚀 Getting Started Guide - Step-by-step setup
- 💡 Examples - Real-world usage examples
- 🐛 Issues - Report bugs or request features
We welcome contributions! Please see our Contributing Guide for details on:
- Setting up the development environment
- Running tests and ensuring quality
- Submitting pull requests
MIT License - see the LICENSE file for details.