Skip to content

Commit

Permalink
Remove perf tests, kinda flaky and useless
Browse files Browse the repository at this point in the history
  • Loading branch information
Bart Veneman committed Dec 29, 2023
1 parent 9557088 commit a7077bb
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 50 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20
Expand Down
16 changes: 0 additions & 16 deletions src/rules/max-selector-complexity/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,20 +188,4 @@ test('should only report the one selector in a list thats problematic', async ()
])
});

test('should run reasonably fast', async () => {
const config = {
plugins: ['./src/rules/max-selector-complexity/index.js'],
rules: {
'project-wallace/max-selector-complexity': 5,
},
};

const code = await (await import('node:fs/promises')).readFile('./test/fixtures/indiatimes.css', 'utf8')
const start = Date.now()
await stylelint.lint({ code, config })
const end = Date.now()

assert.ok(end - start <= (process.env.CI ? 500 : 100), `should run fast, took ${end - start}ms`)
})

test.run()
16 changes: 0 additions & 16 deletions src/rules/no-property-browserhacks/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,4 @@ test('should error on a property hack', async () => {
assert.is(column, 5)
});

test('should run reasonably fast', async () => {
const config = {
plugins: ['./src/rules/no-property-browserhacks/index.js'],
rules: {
[rule_name]: true,
},
};

const code = await (await import('node:fs/promises')).readFile('./test/fixtures/indiatimes.css', 'utf8')
const start = Date.now()
await stylelint.lint({ code, config })
const end = Date.now()

assert.ok(end - start <= (process.env.CI ? 250 : 50), `should run fast, took ${end - start}ms`)
})

test.run()
16 changes: 0 additions & 16 deletions src/rules/no-unused-custom-properties/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,20 +153,4 @@ test('ignores options when options.ignoreProperties types are incorrect', async
assert.is(column, 5)
});

test('should run reasonably fast', async () => {
const config = {
plugins: ['./src/rules/no-unused-custom-properties/index.js'],
rules: {
'project-wallace/no-unused-custom-properties': true,
},
};

const code = await (await import('node:fs/promises')).readFile('./test/fixtures/indiatimes.css', 'utf8')
const start = Date.now()
await stylelint.lint({ code, config })
const end = Date.now()

assert.ok(end - start <= process.env.CI ? 50 : 10, `should run in less than 1 second, took ${end - start}ms`)
})

test.run()
1 change: 0 additions & 1 deletion test/fixtures/indiatimes.css

This file was deleted.

0 comments on commit a7077bb

Please sign in to comment.