From 4ed5f9a8a5a5a861005f67c51066793df75cbbd9 Mon Sep 17 00:00:00 2001 From: evilebottnawi Date: Thu, 16 Sep 2021 17:04:36 +0300 Subject: [PATCH] test: fix --- test/__snapshots__/import-option.test.js.snap | 50 +++++++++---------- test/runtime/__snapshots__/api.test.js.snap | 2 +- test/sourceMap-option.test.js | 2 +- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/test/__snapshots__/import-option.test.js.snap b/test/__snapshots__/import-option.test.js.snap index 95048ad7..38628de9 100644 --- a/test/__snapshots__/import-option.test.js.snap +++ b/test/__snapshots__/import-option.test.js.snap @@ -872,22 +872,22 @@ a { }@layer(default) {.test { a: a; } -}@layer(default) {@supports(display: flex) {@media screen and (min-width: 400px) {.test { +}@supports(display: flex) {@media screen and (min-width: 400px) {@layer(default) {.test { a: a; } -}}}@supports(display: flex) {@media screen and (min-width: 400px) {@import url(http://example.com/style.css);}}@layer(default) {@supports(display: flex) {@media screen and (min-width:400px) {.test { +}}}@media screen and (min-width: 400px) {@supports(display: flex) {@import url(http://example.com/style.css);}}@supports(display: flex) {@media screen and (min-width:400px) {@layer(default) {.test { a: a; } }}}@media screen and (min-width: 400px) {.test { a: a; } -}@layer( default ) {@supports( display : flex ) {@media screen and ( min-width : 400px ) {.test { +}@supports( display : flex ) {@media screen and ( min-width : 400px ) {@layer( default ) {.test { a: a; } -}}}@layer(default) {@supports(display: flex) {@media screen and (min-width: 400px) {.test { +}}}@supports(display: flex) {@media screen and (min-width: 400px) {@layer(default) {.test { a: a; } -}}}@/* comment */ layer(/* comment */default/* comment */) {@/* comment */ supports(/* comment */display/* comment */:/* comment */ flex/* comment */) {@media /* comment */ screen/* comment */ and/* comment */ (/* comment */min-width/* comment */: /* comment */400px/* comment */) {.test { +}}}@/* comment */ supports(/* comment */display/* comment */:/* comment */ flex/* comment */) {@media /* comment */ screen/* comment */ and/* comment */ (/* comment */min-width/* comment */: /* comment */400px/* comment */) {@/* comment */ layer(/* comment */default/* comment */) {.test { a: a; } }}}.test { @@ -908,16 +908,16 @@ a { }@supports(display: flex) {}@supports(display: flex) and supports(display: grid) {@media screen and (min-width: 400px) and handheld and (max-width: 400px) {.test { a: a; } -}}@supports(display: flex) {@media screen and (min-width: 400px) {}}@layer(base) {@layer(default) and supports(display: grid) {.test { +}}@supports(display: flex) {@media screen and (min-width: 400px) {}}@layer(default) and supports(display: grid) {@layer(base) {.test { a: a; } }}@layer(default) {}@layer(default) and layer {.test { a: a; } -}@layer(default) {}@layer(default) {@supports(display: flex) and layer(base) {.test { +}@layer(default) {}@supports(display: flex) and layer(base) {@layer(default) {.test { a: a; } -}}@layer(default) {@supports(display: flex) {}}@layer(default) {@supports(display: flex) {@media screen and (min-width: 400px) {}}}@media unknown(default) unknown(display: flex) unknown {.test { +}}@supports(display: flex) {@layer(default) {}}@supports(display: flex) {@media screen and (min-width: 400px) {@layer(default) {}}}@media unknown(default) unknown(display: flex) unknown {.test { a: a; } }@import url(); @@ -1448,22 +1448,22 @@ a { }@layer(default) {.test { a: a; } -}@layer(default) {@supports(display: flex) {@media screen and (min-width: 400px) {.test { +}@supports(display: flex) {@media screen and (min-width: 400px) {@layer(default) {.test { a: a; } -}}}@supports(display: flex) {@media screen and (min-width: 400px) {@import url(http://example.com/style.css);}}@layer(default) {@supports(display: flex) {@media screen and (min-width:400px) {.test { +}}}@media screen and (min-width: 400px) {@supports(display: flex) {@import url(http://example.com/style.css);}}@supports(display: flex) {@media screen and (min-width:400px) {@layer(default) {.test { a: a; } }}}@media screen and (min-width: 400px) {.test { a: a; } -}@layer( default ) {@supports( display : flex ) {@media screen and ( min-width : 400px ) {.test { +}@supports( display : flex ) {@media screen and ( min-width : 400px ) {@layer( default ) {.test { a: a; } -}}}@layer(default) {@supports(display: flex) {@media screen and (min-width: 400px) {.test { +}}}@supports(display: flex) {@media screen and (min-width: 400px) {@layer(default) {.test { a: a; } -}}}@/* comment */ layer(/* comment */default/* comment */) {@/* comment */ supports(/* comment */display/* comment */:/* comment */ flex/* comment */) {@media /* comment */ screen/* comment */ and/* comment */ (/* comment */min-width/* comment */: /* comment */400px/* comment */) {.test { +}}}@/* comment */ supports(/* comment */display/* comment */:/* comment */ flex/* comment */) {@media /* comment */ screen/* comment */ and/* comment */ (/* comment */min-width/* comment */: /* comment */400px/* comment */) {@/* comment */ layer(/* comment */default/* comment */) {.test { a: a; } }}}.test { @@ -1484,16 +1484,16 @@ a { }@supports(display: flex) {}@supports(display: flex) and supports(display: grid) {@media screen and (min-width: 400px) and handheld and (max-width: 400px) {.test { a: a; } -}}@supports(display: flex) {@media screen and (min-width: 400px) {}}@layer(base) {@layer(default) and supports(display: grid) {.test { +}}@supports(display: flex) {@media screen and (min-width: 400px) {}}@layer(default) and supports(display: grid) {@layer(base) {.test { a: a; } }}@layer(default) {}@layer(default) and layer {.test { a: a; } -}@layer(default) {}@layer(default) {@supports(display: flex) and layer(base) {.test { +}@layer(default) {}@supports(display: flex) and layer(base) {@layer(default) {.test { a: a; } -}}@layer(default) {@supports(display: flex) {}}@layer(default) {@supports(display: flex) {@media screen and (min-width: 400px) {}}}@media unknown(default) unknown(display: flex) unknown {.test { +}}@supports(display: flex) {@layer(default) {}}@supports(display: flex) {@media screen and (min-width: 400px) {@layer(default) {}}}@media unknown(default) unknown(display: flex) unknown {.test { a: a; } }@import url(); @@ -2602,22 +2602,22 @@ a { }@layer(default) {.test { a: a; } -}@layer(default) {@supports(display: flex) {@media screen and (min-width: 400px) {.test { +}@supports(display: flex) {@media screen and (min-width: 400px) {@layer(default) {.test { a: a; } -}}}@supports(display: flex) {@media screen and (min-width: 400px) {@import url(http://example.com/style.css);}}@layer(default) {@supports(display: flex) {@media screen and (min-width:400px) {.test { +}}}@media screen and (min-width: 400px) {@supports(display: flex) {@import url(http://example.com/style.css);}}@supports(display: flex) {@media screen and (min-width:400px) {@layer(default) {.test { a: a; } }}}@media screen and (min-width: 400px) {.test { a: a; } -}@layer( default ) {@supports( display : flex ) {@media screen and ( min-width : 400px ) {.test { +}@supports( display : flex ) {@media screen and ( min-width : 400px ) {@layer( default ) {.test { a: a; } -}}}@layer(default) {@supports(display: flex) {@media screen and (min-width: 400px) {.test { +}}}@supports(display: flex) {@media screen and (min-width: 400px) {@layer(default) {.test { a: a; } -}}}@/* comment */ layer(/* comment */default/* comment */) {@/* comment */ supports(/* comment */display/* comment */:/* comment */ flex/* comment */) {@media /* comment */ screen/* comment */ and/* comment */ (/* comment */min-width/* comment */: /* comment */400px/* comment */) {.test { +}}}@/* comment */ supports(/* comment */display/* comment */:/* comment */ flex/* comment */) {@media /* comment */ screen/* comment */ and/* comment */ (/* comment */min-width/* comment */: /* comment */400px/* comment */) {@/* comment */ layer(/* comment */default/* comment */) {.test { a: a; } }}}.test { @@ -2638,16 +2638,16 @@ a { }@supports(display: flex) {}@supports(display: flex) and supports(display: grid) {@media screen and (min-width: 400px) and handheld and (max-width: 400px) {.test { a: a; } -}}@supports(display: flex) {@media screen and (min-width: 400px) {}}@layer(base) {@layer(default) and supports(display: grid) {.test { +}}@supports(display: flex) {@media screen and (min-width: 400px) {}}@layer(default) and supports(display: grid) {@layer(base) {.test { a: a; } }}@layer(default) {}@layer(default) and layer {.test { a: a; } -}@layer(default) {}@layer(default) {@supports(display: flex) and layer(base) {.test { +}@layer(default) {}@supports(display: flex) and layer(base) {@layer(default) {.test { a: a; } -}}@layer(default) {@supports(display: flex) {}}@layer(default) {@supports(display: flex) {@media screen and (min-width: 400px) {}}}@media unknown(default) unknown(display: flex) unknown {.test { +}}@supports(display: flex) {@layer(default) {}}@supports(display: flex) {@media screen and (min-width: 400px) {@layer(default) {}}}@media unknown(default) unknown(display: flex) unknown {.test { a: a; } }@import url(); @@ -2994,7 +2994,7 @@ a { .second { color: red; } -@supports(display: flex) {@media screen and (min-width: 400px) {@import url(http://example.com/style.css);}}@supports(display: flex) {@import url('./test.css') supports(display: grid);}@supports(display: flex) {@media screen and (min-width: 400px) {@import url('./test.css') supports(display: grid) handheld and (max-width: 400px);}}@layer(default) {@import url('./test.css') layer(base) supports(display: grid);}@layer(default) {@import url('./test.css') layer;}@layer(default) {@supports(display: flex) {@import url('./test.css') layer(base);}}@layer(default) {@supports(display: flex) {@media screen and (min-width: 400px) {}}}@import url(test.css); +@media screen and (min-width: 400px) {@supports(display: flex) {@import url(http://example.com/style.css);}}@supports(display: flex) {@import url('./test.css') supports(display: grid);}@supports(display: flex) {@media screen and (min-width: 400px) {@import url('./test.css') supports(display: grid) handheld and (max-width: 400px);}}@layer(default) {@import url('./test.css') layer(base) supports(display: grid);}@layer(default) {@import url('./test.css') layer;}@supports(display: flex) {@layer(default) {@import url('./test.css') layer(base);}}@supports(display: flex) {@media screen and (min-width: 400px) {@layer(default) {}}}@import url(test.css); @import url('test.css'); @import url(\\"test.css\\"); @IMPORT url(test.css); diff --git a/test/runtime/__snapshots__/api.test.js.snap b/test/runtime/__snapshots__/api.test.js.snap index ce411137..cf0e11d4 100644 --- a/test/runtime/__snapshots__/api.test.js.snap +++ b/test/runtime/__snapshots__/api.test.js.snap @@ -24,7 +24,7 @@ exports[`api should toString with layer 1`] = `"body { b: 2; }body { c: 3; }body exports[`api should toString with media query list 1`] = `"body { b: 2; }body { c: 3; }body { b: 2; }@media print {body { b: 2; }}@media print {body { d: 4; }}@media screen {body { a: 1; }}"`; -exports[`api should toString with media query list, layer and supports 1`] = `"body { b: 2; }body { c: 3; }body { b: 2; }@media print {body { b: 2; }}@media print {body { d: 4; }}@layer(default) {@supports (display: grid) {@media screen {body { a: 1; }}}}"`; +exports[`api should toString with media query list, layer and supports 1`] = `"body { b: 2; }body { c: 3; }body { b: 2; }@media print {body { b: 2; }}@media print {body { d: 4; }}@supports (display: grid) {@media screen {@layer(default) {body { a: 1; }}}}"`; exports[`api should toString with source mapping 1`] = ` "@[object Object] {body { a: 1; } diff --git a/test/sourceMap-option.test.js b/test/sourceMap-option.test.js index 75d71408..cf08d6b3 100644 --- a/test/sourceMap-option.test.js +++ b/test/sourceMap-option.test.js @@ -498,7 +498,7 @@ describe('"sourceMap" option', () => { (assetName) => /\.js$/.test(assetName) ); - expect(chunkName).toBe("main.3d1970f1effd30ed73f3.bundle.js"); + expect(chunkName).toBe("main.c702906a958e85e1ca77.bundle.js"); expect( getModuleSource("fixtures/source-map/basic.css", stats) ).toMatchSnapshot("module");