Skip to content

Commit 8dbb49a

Browse files
committed
Add more test
1 parent 23c2a4e commit 8dbb49a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/globalFixtures/options.test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,25 @@ describe('When the preprocessor is set as default scoping', () => {
7676
expect(output).toBe('<style module="scoped">.red-123 { color: red; }</style><p class="red-123">red</p>')
7777
});
7878

79+
it('does not parse when `parseStyleTag` is off', async () => {
80+
const source = '<style module="scoped">.red { color: red; }</style><p class="red">red</p>';
81+
const output = await compiler({
82+
source
83+
}, {
84+
localIdentName: '[local]-123',
85+
parseStyleTag: false,
86+
useAsDefaultScoping: true,
87+
});
88+
89+
expect(output).toBe('<style module="scoped">.red { color: red; }</style><p class="red">red</p>')
90+
});
91+
7992
it('does not parse when the style tag does not exist', async () => {
8093
const source = '<p class="red">red</p>';
8194
const output = await compiler({
8295
source
8396
}, {
97+
parseStyleTag: true,
8498
useAsDefaultScoping: true,
8599
});
86100

0 commit comments

Comments
 (0)