Update CSS parser tests to preserve CRLF where needed

This commit is contained in:
Jordan Pittman 2025-04-29 11:29:05 -04:00
parent 65409a98d9
commit 8319bd83b3

View file

@ -86,7 +86,7 @@ describe.each(['Unix', 'Windows'])('Line endings: %s', (lineEndings) => {
kind: 'comment',
value: `!
* License #2
`,
`.replaceAll(/\r?\n/g, lineEndings === 'Windows' ? '\r\n' : '\n'),
},
])
})
@ -368,7 +368,7 @@ describe.each(['Unix', 'Windows'])('Line endings: %s', (lineEndings) => {
background-color: red;
/* A comment */
content: 'Hello, world!';
}`,
}`.replaceAll(/\r?\n/g, lineEndings === 'Windows' ? '\r\n' : '\n'),
important: false,
},
])
@ -396,7 +396,7 @@ describe.each(['Unix', 'Windows'])('Line endings: %s', (lineEndings) => {
background-color: red;
/* A comment ; */
content: 'Hello, world!';
}`,
}`.replaceAll(/\r?\n/g, lineEndings === 'Windows' ? '\r\n' : '\n'),
important: false,
},
{
@ -406,7 +406,7 @@ describe.each(['Unix', 'Windows'])('Line endings: %s', (lineEndings) => {
background-color: red;
/* A comment } */
content: 'Hello, world!';
}`,
}`.replaceAll(/\r?\n/g, lineEndings === 'Windows' ? '\r\n' : '\n'),
important: false,
},
])