Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #4982

Merged
merged 1 commit into from Oct 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/code-scanning.yml
Expand Up @@ -27,7 +27,6 @@ jobs:
- name: Initialize CodeQL
uses: github/codeql-action/init@v1


# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java
Expand Down
4 changes: 2 additions & 2 deletions lib/__tests__/disableRanges.test.js
Expand Up @@ -875,7 +875,7 @@ it('SCSS // disable comment (with // comment immediately before)', () => {
});
});

it('SCSS two adjacent // disable comments ', () => {
it('SCSS two adjacent // disable comments', () => {
const scssSource = `a {
// stylelint-disable declaration-no-important
// stylelint-disable foo-bar
Expand Down Expand Up @@ -904,7 +904,7 @@ it('SCSS two adjacent // disable comments ', () => {
});
});

it('SCSS two adjacent // disable comments with multi-line descriptions ', () => {
it('SCSS two adjacent // disable comments with multi-line descriptions', () => {
const scssSource = `a {
// stylelint-disable declaration-no-important --
// Description 1
Expand Down
74 changes: 40 additions & 34 deletions lib/__tests__/standalone.test.js
Expand Up @@ -31,40 +31,46 @@ describe('standalone with one input file', () => {
});
});

describe('standalone with two file-specific globs', () => {
const twoCsses = [`${fixturesPath}/e*y-block.*`, `${fixturesPath}/invalid-h*.css`];

let output;
let results;

beforeEach(() => {
return standalone({
files: twoCsses,
config: {
rules: { 'block-no-empty': true, 'color-no-invalid-hex': true },
},
}).then((data) => {
output = data.output;
results = data.results;
});
});

it('triggers warnings', () => {
expect(output).toContain('block-no-empty');
expect(output).toContain('color-no-invalid-hex');
expect(results).toHaveLength(2);
expect(results[0].warnings).toHaveLength(1);
expect(results[1].warnings).toHaveLength(1);

// Ordering of the files is non-deterministic, I believe
if (results[0].source.includes('empty-block')) {
expect(results[0].warnings[0].rule).toBe('block-no-empty');
expect(results[1].warnings[0].rule).toBe('color-no-invalid-hex');
} else {
expect(results[1].warnings[0].rule).toBe('block-no-empty');
expect(results[0].warnings[0].rule).toBe('color-no-invalid-hex');
}
});
it('standalone with two file-specific globs', async () => {
const { output, results } = await standalone({
files: [`${fixturesPath}/e*y-block.*`, `${fixturesPath}/invalid-h*.css`],
config: {
rules: { 'block-no-empty': true, 'color-no-invalid-hex': true },
},
});

expect(output).toContain('block-no-empty');
expect(output).toContain('color-no-invalid-hex');
expect(results).toHaveLength(2);
expect(results[0].warnings).toHaveLength(1);
expect(results[1].warnings).toHaveLength(1);

/**
* Expecting warnings for these two rules, and order of warnings is not important,
* because files could be linted in any order
* [
* { warnings: [{ rule: 'block-no-empty' }] },
* { warnings: [{ rule: 'color-no-invalid-hex' }] },
* ]
*/
expect(results).toEqual(
expect.arrayContaining([
expect.objectContaining({
warnings: expect.arrayContaining([
expect.objectContaining({
rule: 'block-no-empty',
}),
]),
}),
expect.objectContaining({
warnings: expect.arrayContaining([
expect.objectContaining({
rule: 'color-no-invalid-hex',
}),
]),
}),
]),
);
});

describe('standalone with files and globbyOptions', () => {
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/__tests__/isContextFunctionalPseudoClass.test.js
Expand Up @@ -21,7 +21,7 @@ describe('isContextFunctionalPseudoClass', () => {
expect(isContextFunctionalPseudoClass(pseudo('a:hover {}'))).toBe(false);
});

it('handles logical combinations, ', () => {
it('handles logical combinations', () => {
expect(isContextFunctionalPseudoClass(pseudo('a:has(.foo) {}'))).toBe(true);
expect(isContextFunctionalPseudoClass(pseudo('a:is(.foo) {}'))).toBe(true);
expect(isContextFunctionalPseudoClass(pseudo('a:matches(.foo) {}'))).toBe(true);
Expand Down
Expand Up @@ -24,7 +24,7 @@ describe('isStandardSyntaxMediaFeatureName', () => {
it('scss var single quoted addition', () => {
expect(isStandardSyntaxMediaFeatureName("'min-width + $value'")).toBeFalsy();
});
it('scss var single quoted added to ', () => {
it('scss var single quoted added to', () => {
expect(isStandardSyntaxMediaFeatureName("'$value + min-width'")).toBeFalsy();
});
it('scss var doubled quoted addition', () => {
Expand Down