Commit 5e28b90
authored
test: Reduce output noise (#316)
* test: Prevent invalid React HTML attribute error
This context property was changed in the component itself, but
overlooked in the test as it did not create a failure, just an error
log.
```
console.error
Warning: React does not recognize the `projectPath` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `projectpath` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
at code
at CodeBlock (/Users/davidcalhoun/Sites/a8c/studio/src/components/assistant-code-block.tsx:22:32)
15 |
16 | it( 'should render inline styles for language-generic code', () => {
> 17 | render( <CodeBlock children="example-code" /> );
| ^
18 |
19 | expect( screen.getByText( 'example-code' ) ).toBeVisible();
20 | expect( screen.queryByText( 'Copy' ) ).not.toBeInTheDocument();
```
* test: Exclude expected console error and warning message in test output
Minimize unnecessary noise in test output.
```
console.warn
PHP.run() output was: #!/usr/bin/env php
at _NodePHP.run (node_modules/@php-wasm/node/index.cjs:72997:17)
console.error
PHPExecutionFailureError2: PHP.run() failed with exit code 1 and the following output:
at _NodePHP.run (/Users/davidcalhoun/Sites/a8c/studio/node_modules/@php-wasm/node/index.cjs:72998:23) {
response: _PHPResponse {
httpStatusCode: 500,
headers: { 'x-powered-by': [Array], 'content-type': [Array] },
bytes: Uint8Array(19) [
35, 33, 47, 117, 115, 114,
47, 98, 105, 110, 47, 101,
110, 118, 32, 112, 104, 112,
10
],
exitCode: 1,
errors: ''
},
source: 'request'
}
at _NodePHP.run (node_modules/@php-wasm/node/index.cjs:73003:17)
```
* test: Replace use of deprecated `fs.rmdir` with `fs.rm`
Addresses warning logged in test output:
```
(node:82794) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead
(Use `node --trace-deprecation ...` to show where the warning was created)
```
* test: Filter verbose console messages
Reduce the noise in test results caused by various usages of `console`
within the source.1 parent 585ec0d commit 5e28b90
3 files changed
Lines changed: 43 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
32 | 65 | | |
33 | 66 | | |
34 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
34 | 38 | | |
35 | 39 | | |
36 | 40 | | |
| |||
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
42 | 49 | | |
43 | 50 | | |
44 | 51 | | |
| |||
0 commit comments