Skip to content

Commit

Permalink
Sync with Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
prettierci-commits committed May 12, 2018
1 parent 7535a2d commit 7799b6d
Show file tree
Hide file tree
Showing 4 changed files with 3,158 additions and 2,871 deletions.
2 changes: 2 additions & 0 deletions tests/web-platform/README.md
@@ -1,6 +1,7 @@
# Run tests

You'll need two terminal sessions for this.

1. Install deps `yarn`
2. Start the server: `yarn start`
3. In the other session: `yarn test`
Expand All @@ -10,6 +11,7 @@ You can also open http://localhost:3000 in the browser to run the tests.
# Why are tests setup like this?

Two reasons.

1. It helps with staying in sync with the same tests that browsers run when checking if they are implementing the spec correctly.
2. Easier to run tests in different browsers, compared to if a more conventional cypress or jest setup were used.

Expand Down
75 changes: 40 additions & 35 deletions tests/web-platform/resources/testharness.css
@@ -1,102 +1,107 @@
html {
font-family:DejaVu Sans, Bitstream Vera Sans, Arial, Sans;
font-family: DejaVu Sans, Bitstream Vera Sans, Arial, Sans;
}

#log .warning,
#log .warning a {
color: black;
background: yellow;
color: black;
background: yellow;
}

#log .error,
#log .error a {
color: white;
background: red;
color: white;
background: red;
}

section#summary {
margin-bottom:1em;
margin-bottom: 1em;
}

table#results {
border-collapse:collapse;
table-layout:fixed;
width:100%;
border-collapse: collapse;
table-layout: fixed;
width: 100%;
}

table#results th:first-child,
table#results td:first-child {
width:4em;
width: 4em;
}

table#results th:last-child,
table#results td:last-child {
width:50%;
width: 50%;
}

table#results.assertions th:last-child,
table#results.assertions td:last-child {
width:35%;
width: 35%;
}

table#results th {
padding:0;
padding-bottom:0.5em;
border-bottom:medium solid black;
padding: 0;
padding-bottom: 0.5em;
border-bottom: medium solid black;
}

table#results td {
padding:1em;
padding-bottom:0.5em;
border-bottom:thin solid black;
padding: 1em;
padding-bottom: 0.5em;
border-bottom: thin solid black;
}

tr.pass > td:first-child {
color:green;
color: green;
}

tr.fail > td:first-child {
color:red;
color: red;
}

tr.timeout > td:first-child {
color:red;
color: red;
}

tr.notrun > td:first-child {
color:blue;
color: blue;
}

.pass > td:first-child, .fail > td:first-child, .timeout > td:first-child, .notrun > td:first-child {
font-variant:small-caps;
.pass > td:first-child,
.fail > td:first-child,
.timeout > td:first-child,
.notrun > td:first-child {
font-variant: small-caps;
}

table#results span {
display:block;
display: block;
}

table#results span.expected {
font-family:DejaVu Sans Mono, Bitstream Vera Sans Mono, Monospace;
white-space:pre;
font-family: DejaVu Sans Mono, Bitstream Vera Sans Mono, Monospace;
white-space: pre;
}

table#results span.actual {
font-family:DejaVu Sans Mono, Bitstream Vera Sans Mono, Monospace;
white-space:pre;
font-family: DejaVu Sans Mono, Bitstream Vera Sans Mono, Monospace;
white-space: pre;
}

span.ok {
color:green;
color: green;
}

tr.error {
color:red;
color: red;
}

span.timeout {
color:red;
color: red;
}

span.ok, span.timeout, span.error {
font-variant:small-caps;
}
span.ok,
span.timeout,
span.error {
font-variant: small-caps;
}

0 comments on commit 7799b6d

Please sign in to comment.