summaryrefslogtreecommitdiff
path: root/tools/test-helper/package.json
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-02-20 23:41:42 +0100
committerLaurenz <laurmaedje@gmail.com>2021-02-20 23:41:42 +0100
commit4ff59baf5e8268d607643aeec23d113cd40324c7 (patch)
tree47cd10bc9c48815d65cdf5a84fdf246f39b9e091 /tools/test-helper/package.json
parent05727bfc3a9cfd45a8e2028dfd0806f7a8f88015 (diff)
VS Code extension for easier testing 🛠
This extension enables you to - quickly open the actual and reference output for a test case to the side - re-run the test with the click of a button - approve the test output (moves output to reference folder and optimizes with oxipng)
Diffstat (limited to 'tools/test-helper/package.json')
-rw-r--r--tools/test-helper/package.json72
1 files changed, 72 insertions, 0 deletions
diff --git a/tools/test-helper/package.json b/tools/test-helper/package.json
new file mode 100644
index 00000000..55065838
--- /dev/null
+++ b/tools/test-helper/package.json
@@ -0,0 +1,72 @@
+{
+ "name": "typst-test-helper",
+ "displayName": "Typst Test Helper",
+ "description": "Helps to run, compare and approve Typst tests.",
+ "version": "0.0.1",
+ "engines": {
+ "vscode": "^1.53.0"
+ },
+ "categories": [
+ "Other"
+ ],
+ "activationEvents": [
+ "onCommand:ShortcutMenuBar.openTestOutput",
+ "onCommand:ShortcutMenuBar.approveTestOutput",
+ "onCommand:ShortcutMenuBar.refreshTestOutput"
+ ],
+ "main": "./extension.js",
+ "contributes": {
+ "commands": [
+ {
+ "command": "ShortcutMenuBar.openTestOutput",
+ "title": "Open test output",
+ "category": "ShortcutMenuBar",
+ "icon": {
+ "light": "images/open-light.svg",
+ "dark": "images/open-dark.svg"
+ }
+ },
+ {
+ "command": "ShortcutMenuBar.refreshTestOutput",
+ "title": "Refresh test output",
+ "category": "ShortcutMenuBar",
+ "icon": {
+ "light": "images/refresh-light.svg",
+ "dark": "images/refresh-dark.svg"
+ }
+ },
+ {
+ "command": "ShortcutMenuBar.approveTestOutput",
+ "title": "Approve test output",
+ "category": "ShortcutMenuBar",
+ "icon": {
+ "light": "images/approve-light.svg",
+ "dark": "images/approve-dark.svg"
+ }
+ }
+ ],
+ "menus": {
+ "editor/title": [
+ {
+ "when": "resourceExtname == .typ && resourcePath =~ /.*tests.*/",
+ "command": "ShortcutMenuBar.openTestOutput",
+ "group": "navigation@0"
+ },
+ {
+ "when": "resourceExtname == .typ && resourcePath =~ /.*tests.*/",
+ "command": "ShortcutMenuBar.refreshTestOutput",
+ "group": "navigation@2"
+ },
+ {
+ "when": "resourceExtname == .typ && resourcePath =~ /.*tests.*/",
+ "command": "ShortcutMenuBar.approveTestOutput",
+ "group": "navigation@3"
+ }
+ ]
+ }
+ },
+ "devDependencies": {
+ "@types/vscode": "^1.53.0",
+ "@types/node": "^12.11.7"
+ }
+}