Skip to content

Commit

Permalink
Clean up deprecation message matchers
Browse files Browse the repository at this point in the history
  • Loading branch information
jgerigmeyer committed Nov 15, 2023
1 parent c772c51 commit ef5bada
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion js-api-spec/value/color/color-4-conversions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('Color 4 SassColors Conversions', () => {
// https://github.com/LeaVerou/color.js/pull/338
skipForImpl('sass-embedded', () => {
// TODO: Failing in dart-sass because `hue` should be normalized to the
// [0, 360] range
// [0, 360) range
skipForImpl('dart-sass', () => {
describe('interpolate', () => {
it('interpolates examples', () => {
Expand Down
1 change: 1 addition & 0 deletions js-api-spec/value/color/color-4-nonparametizable.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import * as constructors from './constructors';
describe('Color 4 SassColors Non-parametizable', () => {
// TODO: Waiting on a fix for:
// https://github.com/LeaVerou/color.js/issues/154
// PR: https://github.com/LeaVerou/color.js/pull/344
skipForImpl('sass-embedded', () => {
it('toGamut with space', () => {
const cases: [SassColor, KnownColorSpace, SassColor][] = [
Expand Down
18 changes: 12 additions & 6 deletions js-api-spec/value/color/legacy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,10 @@ describe('Legacy SassColor', () => {
color.change({blue: null});
color.change({alpha: null});
});
expect(stdio.err.match(/\[null-alpha\]/g)).toBeArrayOfSize(1);
expect(stdio.err.match(/color-4-api/g)).toBeArrayOfSize(3);
expect(stdio.err.match(/`alpha: null`/g)).toBeArrayOfSize(1);
expect(stdio.err.match(/`red: null`/g)).toBeArrayOfSize(1);
expect(stdio.err.match(/`green: null`/g)).toBeArrayOfSize(1);
expect(stdio.err.match(/`blue: null`/g)).toBeArrayOfSize(1);
});
it('emits deprecation for channels from unspecified space', () => {
const stdio = captureStdio(() => {
Expand Down Expand Up @@ -535,8 +537,10 @@ describe('Legacy SassColor', () => {
color.change({lightness: null});
color.change({alpha: null});
});
expect(stdio.err.match(/\[null-alpha\]/g)).toBeArrayOfSize(1);
expect(stdio.err.match(/color-4-api/g)).toBeArrayOfSize(3);
expect(stdio.err.match(/`alpha: null`/g)).toBeArrayOfSize(1);
expect(stdio.err.match(/`hue: null`/g)).toBeArrayOfSize(1);
expect(stdio.err.match(/`saturation: null`/g)).toBeArrayOfSize(1);
expect(stdio.err.match(/`lightness: null`/g)).toBeArrayOfSize(1);
});
it('emits deprecation for channels from unspecified space', () => {
const stdio = captureStdio(() => {
Expand Down Expand Up @@ -602,8 +606,10 @@ describe('Legacy SassColor', () => {
color.change({blackness: null});
color.change({alpha: null});
});
expect(stdio.err.match(/\[null-alpha\]/g)).toBeArrayOfSize(1);
expect(stdio.err.match(/color-4-api/g)).toBeArrayOfSize(3);
expect(stdio.err.match(/`alpha: null`/g)).toBeArrayOfSize(1);
expect(stdio.err.match(/`hue: null`/g)).toBeArrayOfSize(1);
expect(stdio.err.match(/`whiteness: null`/g)).toBeArrayOfSize(1);
expect(stdio.err.match(/`blackness: null`/g)).toBeArrayOfSize(1);
});
it('emits deprecation for channels from unspecified space', () => {
const stdio = captureStdio(() => {
Expand Down

0 comments on commit ef5bada

Please sign in to comment.