karma-skill
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".
DeepseekModel
官方收录技能
质量 优秀 · 78
v1.0.0
获取
https://deepseekmodel.com/api/download.php?id=lambdatest-agent-skills-karma-skill-skill-md&format=skill
下载 .skill
标准格式,含 system_prompt 与 model_config,导入任意 Agent 框架即可使用
.skill 文件中 system_prompt 字段的实际内容。
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 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 describe ( 'StringUtils' , () => { it ( 'should capitalize first letter' , () => { expect ( StringUtils . capitalize ( 'hello' )). toBe ( 'Hello' ); }); it ( 'should handle empty string' , () => { expect ( StringUtils . capitalize ( '' )). toBe ( '' ); }); }); Angular Integration // 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
Agent 识别该技能的关键词,点击任意一个即可复制。
该技能未提供触发词。
下载的 .skill 包内含以下字段。
| 字段 | 说明 |
|---|---|
| format | 格式标识(skill/v1) |
| skill_id | 技能唯一 ID |
| name | 技能名称 |
| version | 版本号 |
| description | 技能描述 |
| category | 所属分类(数组) |
| trigger_words | 触发词列表 |
| tags | 标签列表 |
| source | 来源标识 |
| source_url | 来源链接(本页地址) |
| exported_at | 导出时间(每次下载生成) |
| system_prompt | 系统提示词正文 |
| model_config | 模型参数:provider / model / temperature / max_tokens / top_p |
| examples | 示例 |
| install_guide | 各平台导入说明(Coze / Dify / Claude / 自定义框架) |