Skip to content

Commit

Permalink
chore: clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
iChenLei committed Aug 20, 2023
1 parent c0a4d59 commit 985782d
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 25 deletions.
39 changes: 19 additions & 20 deletions .github/workflows/ci.yml
Expand Up @@ -14,8 +14,7 @@ jobs:
strategy:
matrix:
# Test all mainstream operating system
# os: [ubuntu-latest, macos-latest, windows-latest]
os: [windows-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
node: [18]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -34,21 +33,21 @@ jobs:
- name: Run unit test
run: npm run test

# fast_node_test:
# name: 'Tests on ${{matrix.os}} with node${{matrix.node}}'
# strategy:
# matrix:
# os: [ubuntu-latest]
# node: [10, 12, 14, 16, 20]
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v2
# with:
# node-version: ${{ matrix.node }}
# - name: Install npm dependencies
# run: npm install
# - name: Print put node & npm version
# run: node --version && npm --version
# - name: Run unit test
# run: npm run test
fast_node_test:
name: 'Tests on ${{matrix.os}} with node${{matrix.node}}'
strategy:
matrix:
os: [ubuntu-latest]
node: [10, 12, 14, 16, 20]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Install npm dependencies
run: npm install
- name: Print put node & npm version
run: node --version && npm --version
- name: Run unit test
run: npm run test
4 changes: 2 additions & 2 deletions packages/less/test/browser/generator/generate.js
Expand Up @@ -48,15 +48,15 @@ function runSerial(tasks) {

Object.entries(config).forEach(entry => {
const test = entry[1]
const paths = globby.sync(test.src);
const paths = globby.sync(test.src)
const templateString = template(paths, test.options.helpers, test.options.specs)
fs.writeFileSync(path.join(cwd, test.options.outfile), templateString)
tests.push(() => {
const file = 'http://localhost:8081/packages/less/' + test.options.outfile
console.log(file)
return runner({
file,
timeout: 5000,
timeout: 3500,
args: ['disable-web-security']
})
})
Expand Down
4 changes: 2 additions & 2 deletions packages/less/test/browser/generator/runner.config.js
Expand Up @@ -64,8 +64,8 @@ module.exports = {
},
browser: {
src: [
`packages/less/test/browser/less/*.less`,
`packages/less/test/browser/less/plugin/*.less`
`${localTests}/less/*.less`,
`${localTests}/less/plugin/*.less`
],
options: {
helpers: 'test/browser/runner-browser-options.js',
Expand Down
2 changes: 1 addition & 1 deletion packages/less/test/browser/generator/template.js
Expand Up @@ -52,7 +52,7 @@ module.exports = (stylesheets, helpers, spec, less) => {
expect = chai.expect
mocha.setup({
ui: 'bdd',
timeout: 5000
timeout: 2500
});
</script>
<script src="common.js"></script>
Expand Down

0 comments on commit 985782d

Please sign in to comment.