|
1 | 1 | --- |
2 | 2 | id: cdp |
3 | | -title: Cdp |
| 3 | +title: Chrome |
4 | 4 | --- |
5 | 5 |
|
6 | | -WIP |
| 6 | +Run your test headless/headful in Chrome with great developer workflow. Just start the runner with |
| 7 | + |
| 8 | +``` |
| 9 | +npx aw chrome -c ./path/to/aw.config.js -w --coverage |
| 10 | +``` |
| 11 | + |
| 12 | +and start testing. It will only rerun affected tests and generate coverage accordingly. |
| 13 | +Add files, remove files as you go and change your tests to rapidly build up a test coverage. |
| 14 | + |
| 15 | +## Options |
| 16 | + |
| 17 | +### --config, -c [string] [default: null] |
| 18 | + |
| 19 | +Path to config file. |
| 20 | + |
| 21 | +### --url [string] [null] |
| 22 | + |
| 23 | +Url to html file. |
| 24 | + |
| 25 | +### --glob [array] [default: ['test/\*\*/\*.spec.{js,ts}']] |
| 26 | + |
| 27 | +Test glob pattern. |
| 28 | + |
| 29 | +### --watch [boolean] [default: false] |
| 30 | + |
| 31 | +Watch for changes. |
| 32 | + |
| 33 | +### --watchGlob, -wg [array] [default: ['src/\*\*/\*.{js,ts}', 'test/\*\*/\*.spec.{js,ts}']] |
| 34 | + |
| 35 | +Glob pattern for watching files that will trigger a rerun. |
| 36 | + |
| 37 | +### --coverage [boolean] [default: false] |
| 38 | + |
| 39 | +Generate coverage. |
| 40 | + |
| 41 | +### --babel.enable [boolean] [default: true] |
| 42 | + |
| 43 | +Enables babel tranformation. |
| 44 | + |
| 45 | +### --babel.core [string|module] [default: ''] |
| 46 | + |
| 47 | +Path to babel core module. |
| 48 | + |
| 49 | +### --babel.babelPluginIstanbul [string|module] [default: ''] |
| 50 | + |
| 51 | +Path to babel plugin istanbul module. |
| 52 | + |
| 53 | +### --babel.options [object] [default: {}] |
| 54 | + |
| 55 | +Pass options to babel. |
| 56 | + |
| 57 | +### --babel.typescript [string] [default: 'typescript'] |
| 58 | + |
| 59 | +Path to typescript compiler module. |
| 60 | + |
| 61 | +### --transform.typescript.config [string] [default: tsconfig.json] |
| 62 | + |
| 63 | +Path to typescript config file. |
| 64 | + |
| 65 | +### --transform.typescript.babelOptions [object] [default: {}] |
| 66 | + |
| 67 | +Pass options to babel. |
| 68 | + |
| 69 | +### --transform.include [array] [default: []] |
| 70 | + |
| 71 | +Include glob for transformation. |
| 72 | + |
| 73 | +### --transform.exclude [array] [default: []] |
| 74 | + |
| 75 | +Exclude glob for transformation. |
| 76 | + |
| 77 | +### --transform.defaultExclude [array] [default: ['\*\*/coverage/\*\*','\*\*/external/\*\*','\*\*/autogenerated/\*\*','\*\*/\*.(html|css|json|txt|ttf|woff|svg)','\*\*/\*require\*.js','\*\*/\*sinon\*.js','\*\*/\*chai\*.js']] |
| 78 | + |
| 79 | +Default exclude glob for transformation. |
| 80 | + |
| 81 | +### --instrument.include [array] [default: []] |
| 82 | + |
| 83 | +Include glob for instrumentation. |
| 84 | + |
| 85 | +### --instrument.exclude [array] [default: []] |
| 86 | + |
| 87 | +Exclude glob for instrumentation. |
| 88 | + |
| 89 | +### --instrument.defaultExclude [array] [default: ['\*\*/coverage/\*\*','\*\*/external/\*\*','\*\*/autogenerated/\*\*','\*\*/\*.(html|css|json|txt|ttf|woff|svg)','\*\*/\*require\*.js','\*\*/\*sinon\*.js','\*\*/\*chai\*.js','\*\*/\*.spec.{js,ts}']] |
| 90 | + |
| 91 | +### --mocha.reporter [string] [default: undefined] |
| 92 | + |
| 93 | +Which reporter to use. |
| 94 | + |
| 95 | +Check Mochas [**list**](https://mochajs.org/#reporters) for valid options. |
| 96 | + |
| 97 | + |
| 98 | +### --mocha.bail [boolean] [default: true] |
| 99 | + |
| 100 | +Bails on failure |
| 101 | + |
| 102 | +### --mocha.timeout [number] [default: undefined] |
| 103 | + |
| 104 | +Timeout in ms. |
| 105 | + |
| 106 | +### --mocha.ui [string] [default: 'bdd'] |
| 107 | + |
| 108 | +The test interface to use. |
| 109 | + |
| 110 | +### --mocha.useColors [boolean] [default: true] |
| 111 | + |
| 112 | +Use colors in output. |
| 113 | + |
| 114 | +### --client.port [number] [default: 9222] |
| 115 | + |
| 116 | +Chrome port. |
| 117 | + |
| 118 | +### --client.launch [boolean] [default: true] |
| 119 | + |
| 120 | +Launch Chrome. |
| 121 | + |
| 122 | +### --client.devtools [boolean] [default: false] |
| 123 | + |
| 124 | +Open Chrome with dev tools. |
| 125 | + |
| 126 | +### --chrome.port [number] [default: 9222] |
| 127 | + |
| 128 | +Chrome port. |
| 129 | + |
| 130 | +### --chrome.flags [array] [default: ['--headless', '--disable-gpu', '--allow-file-access-from-files']] |
| 131 | + |
| 132 | +Chrome flags. |
| 133 | + |
| 134 | +### --nyc.include [array] [default: []] |
| 135 | + |
| 136 | +### --http.port [number] [default: 9676] |
| 137 | + |
| 138 | +Http port. |
| 139 | + |
| 140 | +### --http.root [array] [default: ['./']] |
| 141 | + |
| 142 | +Root folders to serve. |
| 143 | + |
| 144 | +### --http.rewrite [object] [default: {} |
| 145 | + |
| 146 | +Rewrite url(s). |
| 147 | + |
| 148 | +### --nyc.tempDirectory [string] [default: './coverage/.nyc_output'] |
| 149 | + |
| 150 | +Directory to output raw coverage information to. |
| 151 | + |
| 152 | +### --nyc.reporter [array] [default: ['lcov', 'text-summary']] |
| 153 | + |
| 154 | +Coverage reporter(s) to use. |
| 155 | + |
| 156 | + |
| 157 | +### --nyc.reportDir [string] [default: 'coverage'] |
| 158 | + |
| 159 | +Directory to output coverage reports in. |
0 commit comments