File tree Expand file tree Collapse file tree 3 files changed +5
-13
lines changed Expand file tree Collapse file tree 3 files changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ import {
25
25
getInputType ,
26
26
toLowerCase ,
27
27
extractFileExtension ,
28
- absoluteToStylesheet
28
+ absoluteToStylesheet ,
29
29
} from './utils' ;
30
30
31
31
let _id = 1 ;
Original file line number Diff line number Diff line change @@ -96,18 +96,13 @@ export function escapeImportStatement(rule: CSSImportRule): string {
96
96
export function stringifyStylesheet ( s : CSSStyleSheet ) : string | null {
97
97
try {
98
98
const rules = s . rules || s . cssRules ;
99
- const stringifiedRules = Array
100
- . from ( rules , stringifyRule )
99
+ const stringifiedRules = Array . from ( rules , stringifyRule )
101
100
. map ( ( rule ) => {
102
- return s . href ? absoluteToStylesheet ( rule , s . href ) : rule
101
+ return s . href ? absoluteToStylesheet ( rule , s . href ) : rule ;
103
102
} )
104
103
. join ( '' ) ;
105
104
106
- return rules
107
- ? fixBrowserCompatibilityIssuesInCSS (
108
- stringifiedRules ,
109
- )
110
- : null ;
105
+ return rules ? fixBrowserCompatibilityIssuesInCSS ( stringifiedRules ) : null ;
111
106
} catch ( error ) {
112
107
return null ;
113
108
}
Original file line number Diff line number Diff line change 3
3
*/
4
4
import { JSDOM } from 'jsdom' ;
5
5
import { describe , it , expect } from 'vitest' ;
6
- import {
7
- serializeNodeWithId ,
8
- _isBlockedElement ,
9
- } from '../src/snapshot' ;
6
+ import { serializeNodeWithId , _isBlockedElement } from '../src/snapshot' ;
10
7
import snapshot from '../src/snapshot' ;
11
8
import { serializedNodeWithId , elementNode } from '../src/types' ;
12
9
import { Mirror , absoluteToStylesheet } from '../src/utils' ;
You can’t perform that action at this time.
0 commit comments