Skip to content

Commit

Permalink
Merge pull request #14 from deinsoftware/dev
Browse files Browse the repository at this point in the history
added select and disabled snippets
  • Loading branch information
equiman authored Apr 18, 2023
2 parents b8954a7 + 0ba301c commit c70694c
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
"thbct",
"thbcw",
"thblcw",
"thpd",
"thps",
"tmis",
"ttemis",
"ttems",
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ Fixed for any bug fixes.
Security to invite users to upgrade in case of vulnerabilities.
-->

## 1.7.0 - 2023/04/18

### Added

- `thpd` and `thps` snippets

## 1.6.1 - 2023/04/15

### Fixed
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ Below is a list of all available snippets and the triggers of each one. The `░
| `thblcw→` | `expect(░).toHaveBeenLastCalledWith(░)█` |
| `thl→` | `expect(░).toHaveLength(░)█` |
| `thp→` | `expect(░).toHaveProperty(░keyPath, ░value)█` |
| `thpd→` | `expect(░).toHaveProperty('disabled')█` |
| `thps→` | `expect(░).toHaveProperty('selected')█` |
| `tm→` | `expect(░).toMatch(░)█` |
| `tmis→` | `expect(░).toMatchInlineSnapshot(░)█` |
| `tmo→` | `expect(░).toMatchObject(░)█` |
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vitest-snippets",
"description": "VS Code Vitest snippets for JS and TS",
"version": "1.6.1",
"version": "1.7.1",
"displayName": "Vitest Snippets",
"publisher": "deinsoftware",
"icon": "images/light-icon.png",
Expand Down
10 changes: 10 additions & 0 deletions snippets/assertion.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,16 @@
"body": "expect($1).toHaveProperty(${2:keyPath}, ${3:value})$0",
"description": "returns true if the argument matches the second object"
},
"toHavePropertyDisabled": {
"prefix": "thpd",
"body": "expect($1).toHaveProperty('disabled')$0",
"description": "returns true if the property disabled"
},
"toHavePropertySelected": {
"prefix": "thps",
"body": "expect($1).toHaveProperty('disabled')$0",
"description": "returns true if the property selected"
},
"toMatch": {
"prefix": "tm",
"body": "expect($1).toMatch($2)$0",
Expand Down

0 comments on commit c70694c

Please sign in to comment.