Skills Plugins MCP Prompt Model 博客 我的中心
开发编程 #javascript

jasmine-skill

Generates Jasmine tests in JavaScript. BDD-style framework with spies and async support. Use when user mentions "Jasmine", "jasmine.createSpy", "toHaveBeenCalled". Triggers on: "Jasmine", "jasmine test", "createSpy", "Jasmine spec".

DeepseekModel 官方收录技能 质量 优秀 · 78 v1.0.0

获取

https://deepseekmodel.com/api/download.php?id=lambdatest-agent-skills-jasmine-skill-skill-md&format=skill
下载 .skill 标准格式,含 system_prompt 与 model_config,导入任意 Agent 框架即可使用
.skill 文件中 system_prompt 字段的实际内容。
name jasmine-skill description Generates Jasmine tests in JavaScript. BDD-style framework with spies and async support. Use when user mentions "Jasmine", "jasmine.createSpy", "toHaveBeenCalled". Triggers on: "Jasmine", "jasmine test", "createSpy", "Jasmine spec". languages ["JavaScript","TypeScript"] category unit-testing license MIT metadata {"author":"TestMu AI","version":"1.0"} Jasmine Testing Skill Core Patterns Basic Test describe ( 'Calculator' , () => { let calc; beforeEach ( () => { calc = new Calculator (); }); it ( 'should add two numbers' , () => { expect (calc. add ( 2 , 3 )). toBe ( 5 ); }); it ( 'should throw on divide by zero' , () => { expect ( () => calc. divide ( 10 , 0 )). toThrowError ( 'Division by zero' ); }); }); Matchers expect (value). toBe (exact); // === strict expect (value). toEqual (object); // Deep equality expect (value). toBeTruthy (); expect (value). toBeFalsy (); expect (value). toBeNull (); expect (value). toBeUndefined (); expect (value). toBeDefined (); expect (value). toBeNaN (); expect (value). toBeGreaterThan ( 3 ); expect (value). toBeCloseTo ( 0.3 , 5 ); expect (str). toContain ( 'sub' ); expect (str). toMatch ( /pattern/ ); expect (arr). toContain (item); expect (fn). toThrow (); expect (fn). toThrowError ( 'message' ); // Negation expect (value). not . toBe (other); Spies describe ( 'UserService' , () => { let service, api; beforeEach ( () => { api = jasmine. createSpyObj ( 'api' , [ 'get' , 'post' ]); service = new UserService (api); }); it ( 'fetches user from API' , async () => { api. get . and . returnValue ( Promise . resolve ({ name : 'Alice' })); const user = await service. getUser ( 1 ); expect (user. name ). toBe ( 'Alice' ); expect (api. get ). toHaveBeenCalledWith ( '/users/1' ); expect (api. get ). toHaveBeenCalledTimes ( 1 ); }); }); // Spy on existing method spyOn (obj, 'method' ). and . returnValue ( 42 ); spyOn (obj, 'method' ). and . callThrough (); // Call original spyOn (obj, 'method' ). and . throwError ( 'err' ); Async Testing it ( 'fetches data' , async () => { const data = await fetchData (); expect (data). toBeDefined (); }); // With done callback it ( 'fetches data' , ( done ) => { fetchData (). then ( data => { expect (data). toBeDefined (); done (); }); }); // Clock control beforeEach ( () => { jasmine. clock (). install (); }); afterEach ( () => { jasmine. clock (). uninstall (); }); it ( 'handles timeout' , () => { const callback = jasmine. createSpy (); setTimeout (callback, 1000 ); jasmine. clock (). tick ( 1001 ); expect (callback). toHaveBeenCalled (); }); Setup: npm install jasmine --save-dev && npx jasmine init Run: npx jasmine or npx jasmine spec/calculatorSpec.js Deep Patterns See reference/playbook.md for production-grade patterns: Section What You Get §1 Project Setup jasmine.json, TypeScript, spec reporter config §2 Spies — Complete API spyOn, createSpyObj, callFake, returnValues, call tracking §3 Async Testing async/await, expectAsync, promise matchers §4 Custom Matchers Domain-specific matchers, asymmetric matchers §5 Test Organization Nested describe, shared state, focused/excluded §6 Fetch & Module Mocking globalThis.fetch spy, HTTP error handling §7 Browser Testing DOM creation, keyboard events, focus trapping with Karma §8 CI/CD Integration GitHub Actions with coverage, browser testing §9 Debugging Table 12 common problems with causes and fixes §10 Best Practices 14-item checklist for production Jasmine 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 / 自定义框架)
同一份技能可按不同平台格式导出。
.skill 标准格式,含 system_prompt 与 model_config,导入任意 Agent 框架即可使用 下载
.skillpro 增强格式,额外含脚本 / 工具 / 依赖 / 钩子占位 下载
.json 纯 JSON 导出,只含 system_prompt 与模型参数 下载
Coze 带 frontmatter 的 Markdown,Coze 平台导入用 下载
Dify Dify DSL,创建应用后直接导入 下载

每日精选 Skill 推荐,免费送到你邮箱

输入邮箱,每天接收一个精选 AI Agent 技能推荐。完全免费,持续更新。

提交后我们会发送一封确认邮件,点击邮件里的链接才会开始收信。

完全免费,取消任意时间。我们不会发送垃圾邮件。