diff --git a/.vscode/settings.json b/.vscode/settings.json index d27cae5..2b4e4a7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -17,6 +17,8 @@ "thbct", "thbcw", "thblcw", + "thpd", + "thps", "tmis", "ttemis", "ttems", diff --git a/CHANGELOG.md b/CHANGELOG.md index 87be296..4726f4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/README.md b/README.md index a7e7da0..4a2619e 100644 --- a/README.md +++ b/README.md @@ -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(░)█` | diff --git a/package.json b/package.json index ba80deb..a077853 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/snippets/assertion.json b/snippets/assertion.json index 5e0afa0..7ffc4d3 100644 --- a/snippets/assertion.json +++ b/snippets/assertion.json @@ -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",