Skip to content

Commit

Permalink
use env.ENGINE in integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinMalfait committed Apr 12, 2023
1 parent 5fea29f commit fea35dc
Show file tree
Hide file tree
Showing 9 changed files with 94 additions and 94 deletions.
20 changes: 10 additions & 10 deletions integrations/parcel/tests/integration.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ describe('static build', () => {
env: { NODE_ENV: 'production' },
})

if (!env.OXIDE) {
if (env.ENGINE === 'stable') {
expect(await readOutputFile(/index\.\w+\.css$/)).toIncludeCss(
css`
.bg-primary {
Expand All @@ -85,7 +85,7 @@ describe('static build', () => {
)
}

if (env.OXIDE) {
if (env.ENGINE === 'oxide') {
expect(await readOutputFile(/index\.\w+\.css$/)).toIncludeCss(
css`
.bg-primary {
Expand Down Expand Up @@ -138,7 +138,7 @@ describe('static build', () => {
env: { NODE_ENV: 'production' },
})

if (!env.OXIDE) {
if (env.ENGINE === 'stable') {
expect(await readOutputFile(/index\.\w+\.css$/)).toIncludeCss(
css`
.bg-primary {
Expand All @@ -149,7 +149,7 @@ describe('static build', () => {
)
}

if (env.OXIDE) {
if (env.ENGINE === 'oxide') {
expect(await readOutputFile(/index\.\w+\.css$/)).toIncludeCss(
css`
.bg-primary {
Expand Down Expand Up @@ -202,7 +202,7 @@ describe('watcher', () => {
await appendToInputFile('index.html', html`<div class="bg-red-500"></div>`)
})

if (!env.OXIDE) {
if (env.ENGINE === 'stable') {
expect(await readOutputFile(/index\.\w+\.css$/)).toIncludeCss(
css`
.bg-red-500 {
Expand All @@ -219,7 +219,7 @@ describe('watcher', () => {
)
}

if (env.OXIDE) {
if (env.ENGINE === 'oxide') {
expect(await readOutputFile(/index\.\w+\.css$/)).toIncludeCss(
css`
.bg-red-500 {
Expand Down Expand Up @@ -274,7 +274,7 @@ describe('watcher', () => {
await appendToInputFile('glob/index.html', html`<div class="bg-red-500"></div>`)
})

if (!env.OXIDE) {
if (env.ENGINE === 'stable') {
expect(await readOutputFile(/index\.\w+\.css$/)).toIncludeCss(
css`
.bg-red-500 {
Expand All @@ -291,7 +291,7 @@ describe('watcher', () => {
)
}

if (env.OXIDE) {
if (env.ENGINE === 'oxide') {
expect(await readOutputFile(/index\.\w+\.css$/)).toIncludeCss(
css`
.bg-red-500 {
Expand Down Expand Up @@ -445,7 +445,7 @@ describe('watcher', () => {
)
})

if (!env.OXIDE) {
if (env.ENGINE === 'stable') {
expect(await readOutputFile(/index\.\w+\.css$/)).toIncludeCss(
css`
.btn {
Expand All @@ -461,7 +461,7 @@ describe('watcher', () => {
)
}

if (env.OXIDE) {
if (env.ENGINE === 'oxide') {
expect(await readOutputFile(/index\.\w+\.css$/)).toIncludeCss(
css`
.btn {
Expand Down
12 changes: 6 additions & 6 deletions integrations/postcss-cli/tests/integration.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('watcher', () => {
await appendToInputFile('index.html', html`<div class="bg-red-500"></div>`)
await runningProcess.onStderr(ready)

if (!env.OXIDE) {
if (env.ENGINE === 'stable') {
expect(await readOutputFile('main.css')).toIncludeCss(
css`
.bg-red-500 {
Expand All @@ -78,7 +78,7 @@ describe('watcher', () => {
)
}

if (env.OXIDE) {
if (env.ENGINE === 'oxide') {
expect(await readOutputFile('main.css')).toIncludeCss(
css`
.bg-red-500 {
Expand Down Expand Up @@ -128,7 +128,7 @@ describe('watcher', () => {
await appendToInputFile('glob/index.html', html`<div class="bg-red-500"></div>`)
await runningProcess.onStderr(ready)

if (!env.OXIDE) {
if (env.ENGINE === 'stable') {
expect(await readOutputFile('main.css')).toIncludeCss(
css`
.bg-red-500 {
Expand All @@ -145,7 +145,7 @@ describe('watcher', () => {
)
}

if (env.OXIDE) {
if (env.ENGINE === 'oxide') {
expect(await readOutputFile('main.css')).toIncludeCss(
css`
.bg-red-500 {
Expand Down Expand Up @@ -284,7 +284,7 @@ describe('watcher', () => {
)
await runningProcess.onStderr(ready)

if (!env.OXIDE) {
if (env.ENGINE === 'stable') {
expect(await readOutputFile('main.css')).toIncludeCss(
css`
.btn {
Expand All @@ -303,7 +303,7 @@ describe('watcher', () => {
)
}

if (env.OXIDE) {
if (env.ENGINE === 'oxide') {
expect(await readOutputFile('main.css')).toIncludeCss(
css`
/* prettier-ignore */
Expand Down
16 changes: 8 additions & 8 deletions integrations/rollup-sass/tests/integration.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('watcher', () => {
await appendToInputFile('index.html', html`<div class="bg-red-500"></div>`)
await runningProcess.onStderr(ready)

if (!env.OXIDE) {
if (env.ENGINE === 'stable') {
expect(await readOutputFile('index.css')).toIncludeCss(
css`
.bg-red-500 {
Expand All @@ -78,7 +78,7 @@ describe('watcher', () => {
)
}

if (env.OXIDE) {
if (env.ENGINE === 'oxide') {
expect(await readOutputFile('index.css')).toIncludeCss(
css`
.bg-red-500 {
Expand Down Expand Up @@ -128,7 +128,7 @@ describe('watcher', () => {
await appendToInputFile('glob/index.html', html`<div class="bg-red-500"></div>`)
await runningProcess.onStderr(ready)

if (!env.OXIDE) {
if (env.ENGINE === 'stable') {
expect(await readOutputFile('index.css')).toIncludeCss(
css`
.bg-red-500 {
Expand All @@ -145,7 +145,7 @@ describe('watcher', () => {
)
}

if (env.OXIDE) {
if (env.ENGINE === 'oxide') {
expect(await readOutputFile('index.css')).toIncludeCss(
css`
.bg-red-500 {
Expand Down Expand Up @@ -282,7 +282,7 @@ describe('watcher', () => {
)
await runningProcess.onStderr(ready)

if (!env.OXIDE) {
if (env.ENGINE === 'stable') {
expect(await readOutputFile('index.css')).toIncludeCss(
css`
.btn {
Expand All @@ -298,7 +298,7 @@ describe('watcher', () => {
)
}

if (env.OXIDE) {
if (env.ENGINE === 'oxide') {
expect(await readOutputFile('index.css')).toIncludeCss(
css`
.btn {
Expand Down Expand Up @@ -377,7 +377,7 @@ describe('watcher', () => {
)
await runningProcess.onStderr(ready)

if (!env.OXIDE) {
if (env.ENGINE === 'stable') {
expect(await readOutputFile('index.css')).toIncludeCss(
css`
.btn {
Expand All @@ -393,7 +393,7 @@ describe('watcher', () => {
)
}

if (env.OXIDE) {
if (env.ENGINE === 'oxide') {
expect(await readOutputFile('index.css')).toIncludeCss(
css`
.btn {
Expand Down
20 changes: 10 additions & 10 deletions integrations/rollup/tests/integration.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe('static build', () => {
env: { NODE_ENV: 'production' },
})

if (!env.OXIDE) {
if (env.ENGINE === 'stable') {
expect(await readOutputFile('index.css')).toIncludeCss(
css`
.bg-primary {
Expand All @@ -73,7 +73,7 @@ describe('static build', () => {
)
}

if (env.OXIDE) {
if (env.ENGINE === 'oxide') {
expect(await readOutputFile('index.css')).toIncludeCss(
css`
.bg-primary {
Expand Down Expand Up @@ -120,7 +120,7 @@ describe('static build', () => {
env: { NODE_ENV: 'production' },
})

if (!env.OXIDE) {
if (env.ENGINE === 'stable') {
expect(await readOutputFile('index.css')).toIncludeCss(
css`
.bg-primary {
Expand All @@ -131,7 +131,7 @@ describe('static build', () => {
)
}

if (env.OXIDE) {
if (env.ENGINE === 'oxide') {
expect(await readOutputFile('index.css')).toIncludeCss(
css`
.bg-primary {
Expand Down Expand Up @@ -175,7 +175,7 @@ describe('watcher', () => {
await appendToInputFile('index.html', html`<div class="bg-red-500"></div>`)
await runningProcess.onStderr(ready)

if (!env.OXIDE) {
if (env.ENGINE === 'stable') {
expect(await readOutputFile('index.css')).toIncludeCss(
css`
.bg-red-500 {
Expand All @@ -192,7 +192,7 @@ describe('watcher', () => {
)
}

if (env.OXIDE) {
if (env.ENGINE === 'oxide') {
expect(await readOutputFile('index.css')).toIncludeCss(
css`
.bg-red-500 {
Expand Down Expand Up @@ -242,7 +242,7 @@ describe('watcher', () => {
await appendToInputFile('glob/index.html', html`<div class="bg-red-500"></div>`)
await runningProcess.onStderr(ready)

if (!env.OXIDE) {
if (env.ENGINE === 'stable') {
expect(await readOutputFile('index.css')).toIncludeCss(
css`
.bg-red-500 {
Expand All @@ -259,7 +259,7 @@ describe('watcher', () => {
)
}

if (env.OXIDE) {
if (env.ENGINE === 'oxide') {
expect(await readOutputFile('index.css')).toIncludeCss(
css`
.bg-red-500 {
Expand Down Expand Up @@ -396,7 +396,7 @@ describe('watcher', () => {
)
await runningProcess.onStderr(ready)

if (!env.OXIDE) {
if (env.ENGINE === 'stable') {
expect(await readOutputFile('index.css')).toIncludeCss(
css`
.btn {
Expand All @@ -415,7 +415,7 @@ describe('watcher', () => {
)
}

if (env.OXIDE) {
if (env.ENGINE === 'oxide') {
expect(await readOutputFile('index.css')).toIncludeCss(
css`
.btn {
Expand Down
8 changes: 4 additions & 4 deletions integrations/tailwindcss-cli/tests/cli.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ describe('Build command', () => {

await $(`${EXECUTABLE} --output ./dist/main.css --postcss`)

if (!env.OXIDE) {
if (env.ENGINE === 'stable') {
expect(await readOutputFile('main.css')).toIncludeCss(
css`
.font-bold-after {
Expand All @@ -235,7 +235,7 @@ describe('Build command', () => {
)
}

if (env.OXIDE) {
if (env.ENGINE === 'oxide') {
expect(await readOutputFile('main.css')).toIncludeCss(
css`
.font-bold-after {
Expand Down Expand Up @@ -287,7 +287,7 @@ describe('Build command', () => {

await $(`${EXECUTABLE} --output ./dist/main.css --postcss ./custom.postcss.config.js`)

if (!env.OXIDE) {
if (env.ENGINE === 'stable') {
expect(await readOutputFile('main.css')).toIncludeCss(
css`
.font-bold-after {
Expand All @@ -306,7 +306,7 @@ describe('Build command', () => {
)
}

if (env.OXIDE) {
if (env.ENGINE === 'oxide') {
expect(await readOutputFile('main.css')).toIncludeCss(
css`
.font-bold-after {
Expand Down
Loading

0 comments on commit fea35dc

Please sign in to comment.