karma-skill
/karma-skill
Konfiguruje runner testów Karma do testowania JavaScript w przeglądarce z Jasmine, Mocha lub QUnit, pisząc plik karma.conf.js.
- Autor
- LambdaTest ↗
- Repozytorium
- agent-skills ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 05.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 3
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 05.11.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Konfiguruje runner testów Karma do testowania JavaScript w przeglądarce z Jasmine, Mocha lub QUnit, pisząc plik karma.conf.js.
Wyzwalacze z opisu
Oryginalny opis (EN)
Generates Karma test runner configurations for browser-based JavaScript testing. Works with Jasmine, Mocha, or QUnit. Use when user mentions "Karma", "karma.conf.js", "browser test runner". Triggers on: "Karma", "karma.conf", "karma test runner", "browser-based JS test".
Jak działa
- Core Patterns
- Setup: npm install karma karma-jasmine karma-chrome-launcher karma-coverage --save-dev
- Run: npx karma start or npx karma start --single-run
- Init: npx karma init karma.conf.js
- Deep Patterns
Podgląd SKILL.md
---
name: karma-skill
description: >
Generates Karma test runner configurations for browser-based JavaScript testing.
Works with Jasmine, Mocha, or QUnit. Use when user mentions "Karma",
"karma.conf.js", "browser test runner". Triggers on: "Karma", "karma.conf",
"karma test runner", "browser-based JS test".
languages:
- JavaScript
- TypeScript
category: unit-testing
license: MIT
metadata:
author: TestMu AI
version: "1.0"
---
# Karma Testing Skill
## Core Patterns
### karma.conf.js
```javascript
module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['jasmine'],
files: [
'src/**/*.js',
'test/**/*.spec.js'
],
preprocessors: {
'src/**/*.js': ['coverage']
},
reporters: ['progress', 'coverage'],
coverageReporter: {
type: 'html',
dir: 'coverage/'
},
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome', 'Firefox'],
singleRun: false,
concurrency: Infinity,
// LambdaTest cloud browsers
customLaunchers: {
ChromeLT: {
base: 'WebDriver',
config: {
hostname: 'hub.lambdatest.com',
port: 80
},
browserName: 'Chrome',
version: 'latest',
name: 'Karma Test',
tunnel: true,
user: process.env.LT_USERNAME,
accessKey: process.env.LT_ACCESS_KEY
}
}
});
};
```
### Test with Jasmine Framework
```javascript
describe('StringUtils', () => {
it('should capitalize first letter', () => {
expect(StringUtils.capitalize('hello')).toBe('Hello');
});
it('should handle empty string', () => {
expect(StringUtils.capitalize('')).toBe('');
});
});
```
### Angular Integration
```javascript
// karma.conf.js for Angular
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-coverage'),
require('@angular-devkit/build-angular/plugins/karma')
],
```
## Setup: `npm install karma karma-jasmine karma-chrome-launcher karma-coverage --save-dev`
## Run: `npx karma start` or `npx karma start --single-run`
## Init: `npx karma init karma.conf.js`
## Deep Patterns
See `reference/playbook.md` for production-grade patterns:
| Section | What You Get |
|---------|-------------|
| §1 Production Configuration | Full karma.conf.js with coverage thresholds, reporters, CI launchers |
| §2 Component Testing | Service mocking, DOM interaction, form validation patterns |
| §3 HTTP Service Testing | HttpTestingController, error handling, retry testing |
| §4 Directive & Pipe Testing | Host component pattern, custom pipes with edge cases |
| §5 RxJS & Async Patterns | debounceTime, switchMap cancellation, subscription cleanup |
| §6 Router & NgRx Testing | RouterTestingModule, MockStore, selector overrides |
| §7 LambdaTest Integration | Cloud browser configuration for cross-browser testing |
| §8 CI/CD Integration | GitHub Actions with coverage, test reporting |
| §9 Debugging Table | 12 common problems with causes and fixes |
| §10 Best Practices | 14-item checklist for production Angular testing |
Pliki w paczce (3)
- SKILL.md 3 KB
- reference/advanced-patterns.md 3 KB
- reference/playbook.md 22 KB
Wersje
W bazie nie ma innych skilli o nazwie karma-skill.
Migawka bazy z 13.11.2026 · wersja paczki 2366e6ce9a7c (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100stryker-mutation
Konfiguruje StrykerJS do testów mutacyjnych w JavaScript i TypeScript: wybór runnera, plik konfiguracji, tryb przyrostowy i wynik mutacji. - 95jasmine-skill
Pisze testy jednostkowe w JavaScript w bibliotece Jasmine, z szpiegami, asynchronicznością i składnią BDD. - 100angular-testing
Pomaga testować aplikacje Angular 18-21: TestBed, component harnesses, Karma z Jasmine albo Jest, Angular Testing Library, mockowanie HttpClient, testy NgRx Effects oraz e2e w Cypress i Playwright. - 100stryker-mutation
Konfiguruje StrykerJS do testów mutacyjnych w JavaScript i TypeScript, by znaleźć słabe testy mimo wysokiego pokrycia kodu. - 100mocha-fundamentals
Opisuje podstawy testowania w Mocha: strukturę testów, hooki i wzorce testów asynchronicznych w JavaScript. - 100setup-agent
Konfiguruje połączenie z Karmą, logując się i ustawiając klucz API przed pierwszym użyciem skilli Karmy.