-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(styles): add test to ensure fluid mixins exist (#12838)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
- Loading branch information
1 parent
79a4feb
commit 8a07b83
Showing
10 changed files
with
270 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
packages/styles/scss/components/__tests__/fluid-combo-box-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* Copyright IBM Corp. 2022 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @jest-environment node | ||
*/ | ||
|
||
'use strict'; | ||
|
||
const { SassRenderer } = require('@carbon/test-utils/scss'); | ||
|
||
const { render } = SassRenderer.create(__dirname); | ||
|
||
describe('scss/components/fluid-combo-box', () => { | ||
test('Public API', async () => { | ||
const { unwrap } = await render(` | ||
@use 'sass:map'; | ||
@use 'sass:meta'; | ||
@use '../fluid-combo-box'; | ||
$_: get('mixin', meta.mixin-exists('fluid-combo-box', 'fluid-combo-box')); | ||
`); | ||
expect(unwrap('mixin')).toBe(true); | ||
}); | ||
}); |
27 changes: 27 additions & 0 deletions
27
packages/styles/scss/components/__tests__/fluid-date-picker-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* Copyright IBM Corp. 2022 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @jest-environment node | ||
*/ | ||
|
||
'use strict'; | ||
|
||
const { SassRenderer } = require('@carbon/test-utils/scss'); | ||
|
||
const { render } = SassRenderer.create(__dirname); | ||
|
||
describe('scss/components/fluid-date-picker', () => { | ||
test('Public API', async () => { | ||
const { unwrap } = await render(` | ||
@use 'sass:map'; | ||
@use 'sass:meta'; | ||
@use '../fluid-date-picker'; | ||
$_: get('mixin', meta.mixin-exists('fluid-date-picker', 'fluid-date-picker')); | ||
`); | ||
expect(unwrap('mixin')).toBe(true); | ||
}); | ||
}); |
27 changes: 27 additions & 0 deletions
27
packages/styles/scss/components/__tests__/fluid-dropdown-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* Copyright IBM Corp. 2022 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @jest-environment node | ||
*/ | ||
|
||
'use strict'; | ||
|
||
const { SassRenderer } = require('@carbon/test-utils/scss'); | ||
|
||
const { render } = SassRenderer.create(__dirname); | ||
|
||
describe('scss/components/fluid-dropdown', () => { | ||
test('Public API', async () => { | ||
const { unwrap } = await render(` | ||
@use 'sass:map'; | ||
@use 'sass:meta'; | ||
@use '../fluid-dropdown'; | ||
$_: get('mixin', meta.mixin-exists('fluid-dropdown', 'fluid-dropdown')); | ||
`); | ||
expect(unwrap('mixin')).toBe(true); | ||
}); | ||
}); |
27 changes: 27 additions & 0 deletions
27
packages/styles/scss/components/__tests__/fluid-list-box-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* Copyright IBM Corp. 2022 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @jest-environment node | ||
*/ | ||
|
||
'use strict'; | ||
|
||
const { SassRenderer } = require('@carbon/test-utils/scss'); | ||
|
||
const { render } = SassRenderer.create(__dirname); | ||
|
||
describe('scss/components/fluid-list-box', () => { | ||
test('Public API', async () => { | ||
const { unwrap } = await render(` | ||
@use 'sass:map'; | ||
@use 'sass:meta'; | ||
@use '../fluid-list-box'; | ||
$_: get('mixin', meta.mixin-exists('fluid-list-box', 'fluid-list-box')); | ||
`); | ||
expect(unwrap('mixin')).toBe(true); | ||
}); | ||
}); |
27 changes: 27 additions & 0 deletions
27
packages/styles/scss/components/__tests__/fluid-multiselect-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* Copyright IBM Corp. 2022 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @jest-environment node | ||
*/ | ||
|
||
'use strict'; | ||
|
||
const { SassRenderer } = require('@carbon/test-utils/scss'); | ||
|
||
const { render } = SassRenderer.create(__dirname); | ||
|
||
describe('scss/components/fluid-multiselect', () => { | ||
test('Public API', async () => { | ||
const { unwrap } = await render(` | ||
@use 'sass:map'; | ||
@use 'sass:meta'; | ||
@use '../fluid-multiselect'; | ||
$_: get('mixin', meta.mixin-exists('fluid-multiselect', 'fluid-multiselect')); | ||
`); | ||
expect(unwrap('mixin')).toBe(true); | ||
}); | ||
}); |
27 changes: 27 additions & 0 deletions
27
packages/styles/scss/components/__tests__/fluid-number-input-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* Copyright IBM Corp. 2022 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @jest-environment node | ||
*/ | ||
|
||
'use strict'; | ||
|
||
const { SassRenderer } = require('@carbon/test-utils/scss'); | ||
|
||
const { render } = SassRenderer.create(__dirname); | ||
|
||
describe('scss/components/fluid-number-input', () => { | ||
test('Public API', async () => { | ||
const { unwrap } = await render(` | ||
@use 'sass:map'; | ||
@use 'sass:meta'; | ||
@use '../fluid-number-input'; | ||
$_: get('mixin', meta.mixin-exists('fluid-number-input', 'fluid-number-input')); | ||
`); | ||
expect(unwrap('mixin')).toBe(true); | ||
}); | ||
}); |
27 changes: 27 additions & 0 deletions
27
packages/styles/scss/components/__tests__/fluid-select-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* Copyright IBM Corp. 2022 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @jest-environment node | ||
*/ | ||
|
||
'use strict'; | ||
|
||
const { SassRenderer } = require('@carbon/test-utils/scss'); | ||
|
||
const { render } = SassRenderer.create(__dirname); | ||
|
||
describe('scss/components/fluid-select', () => { | ||
test('Public API', async () => { | ||
const { unwrap } = await render(` | ||
@use 'sass:map'; | ||
@use 'sass:meta'; | ||
@use '../fluid-select'; | ||
$_: get('mixin', meta.mixin-exists('fluid-select', 'fluid-select')); | ||
`); | ||
expect(unwrap('mixin')).toBe(true); | ||
}); | ||
}); |
27 changes: 27 additions & 0 deletions
27
packages/styles/scss/components/__tests__/fluid-text-area-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* Copyright IBM Corp. 2022 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @jest-environment node | ||
*/ | ||
|
||
'use strict'; | ||
|
||
const { SassRenderer } = require('@carbon/test-utils/scss'); | ||
|
||
const { render } = SassRenderer.create(__dirname); | ||
|
||
describe('scss/components/fluid-text-area', () => { | ||
test('Public API', async () => { | ||
const { unwrap } = await render(` | ||
@use 'sass:map'; | ||
@use 'sass:meta'; | ||
@use '../fluid-text-area'; | ||
$_: get('mixin', meta.mixin-exists('fluid-text-area', 'fluid-text-area')); | ||
`); | ||
expect(unwrap('mixin')).toBe(true); | ||
}); | ||
}); |
27 changes: 27 additions & 0 deletions
27
packages/styles/scss/components/__tests__/fluid-text-input-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* Copyright IBM Corp. 2022 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @jest-environment node | ||
*/ | ||
|
||
'use strict'; | ||
|
||
const { SassRenderer } = require('@carbon/test-utils/scss'); | ||
|
||
const { render } = SassRenderer.create(__dirname); | ||
|
||
describe('scss/components/fluid-text-input', () => { | ||
test('Public API', async () => { | ||
const { unwrap } = await render(` | ||
@use 'sass:map'; | ||
@use 'sass:meta'; | ||
@use '../fluid-text-input'; | ||
$_: get('mixin', meta.mixin-exists('fluid-text-input', 'fluid-text-input')); | ||
`); | ||
expect(unwrap('mixin')).toBe(true); | ||
}); | ||
}); |
27 changes: 27 additions & 0 deletions
27
packages/styles/scss/components/__tests__/fluid-time-picker-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* Copyright IBM Corp. 2022 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @jest-environment node | ||
*/ | ||
|
||
'use strict'; | ||
|
||
const { SassRenderer } = require('@carbon/test-utils/scss'); | ||
|
||
const { render } = SassRenderer.create(__dirname); | ||
|
||
describe('scss/components/fluid-time-picker', () => { | ||
test('Public API', async () => { | ||
const { unwrap } = await render(` | ||
@use 'sass:map'; | ||
@use 'sass:meta'; | ||
@use '../fluid-time-picker'; | ||
$_: get('mixin', meta.mixin-exists('fluid-time-picker', 'fluid-time-picker')); | ||
`); | ||
expect(unwrap('mixin')).toBe(true); | ||
}); | ||
}); |