Skip to content

Instantly share code, notes, and snippets.

@ValentinBlokhin
Created August 2, 2017 10:32
Show Gist options
  • Save ValentinBlokhin/919339d08e85d07a6e7122954f5aa3b4 to your computer and use it in GitHub Desktop.
Save ValentinBlokhin/919339d08e85d07a6e7122954f5aa3b4 to your computer and use it in GitHub Desktop.
Gives opportunity to easily start debug ava tests using chrome in webstorm. https://github.com/avajs/ava/blob/master/docs/recipes/debugging-with-chrome-devtools.md
# The list or single options object
# The applicable file patterns. Required. Single (not list) pattern maybe specified.
files: ["**/Tests/**/*", "**/*.spec.*", "**/*.test.*", "!**/node_modules/**/*"]
# The script to run. Defaults to current file.
script: "/usr/local/bin/inspect"
# The script args. Next macros are supported:
# ${file} — current file,
# ${fileNameWithoutExt} — current file name without extension,
# ${0} — n group match (see lineRegExp),
# ${0regExp} — n group match prepared as regExp (required for jest https://github.com/facebook/jest/issues/926)
scriptArgs: ["node_modules/ava/profile.js", "${file}"]
# The node args
# The working directory. Defaults to project root. Relative path resolved against project root.
workingDirectory: "foo"
# The applicable line regExp. Tip: wrap in single quote (use doubled '' to escape ' (http://yaml.org/spec/current.html#id2534365))
lineRegExp: '^\s*(?:test|it|describe)(?:\.[^(]+)?\((?:"|''){1}([^"'']+)'
# The IDs of before run tasks. Only `typescript` (Compile TypeScript) is recognized.
# The run configuration name. Macros as for `scriptArgs` are supported.
rcName: "${fileNameWithoutExt}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment