forked from Ents24/testcafe-browser-provider-fbsimctl
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
270dbca
commit 951bd1e
Showing
14 changed files
with
21,423 additions
and
19,648 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -1,31 +1,35 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: ".nvmrc" | ||
cache: "npm" | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: ".nvmrc" | ||
cache: "npm" | ||
|
||
- name: Install Dependencies | ||
run: npm ci | ||
- name: Install Dependencies | ||
run: npm ci | ||
|
||
- name: Build | ||
run: npm run build | ||
- name: Build | ||
run: npm run build | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
- name: Test | ||
run: npm test | ||
|
||
- name: Test | ||
run: npm test |
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,2 @@ | ||
npx pretty-quick --staged --pattern "**/*.{js,ts,mjs,cjs}" | ||
npm run lint |
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 |
---|---|---|
@@ -1,43 +1,26 @@ | ||
const babel = require('gulp-babel'); | ||
const del = require('del'); | ||
const eslint = require('gulp-eslint'); | ||
const gulp = require('gulp'); | ||
const mocha = require('gulp-mocha'); | ||
|
||
function clean () { | ||
return del(['lib']); | ||
} | ||
|
||
function lint () { | ||
return gulp | ||
.src([ | ||
'src/**/*.js', | ||
'test/**/*.js', | ||
'Gulpfile.js' | ||
]) | ||
.pipe(eslint()) | ||
.pipe(eslint.format()) | ||
.pipe(eslint.failAfterError()); | ||
} | ||
|
||
function build () { | ||
return gulp | ||
.src('src/**/*.js') | ||
.pipe(babel()) | ||
.pipe(gulp.dest('lib')); | ||
} | ||
|
||
function test () { | ||
return gulp | ||
.src('test/**.js') | ||
.pipe(mocha({ | ||
ui: 'bdd', | ||
reporter: 'spec', | ||
timeout: typeof v8debug === 'undefined' ? 2000 : Infinity // NOTE: disable timeouts in debug | ||
})); | ||
} | ||
|
||
exports.clean = clean; | ||
exports.lint = lint; | ||
exports.build = gulp.series(clean, lint, build); | ||
exports.test = gulp.series(build, lint, test); | ||
const babel = require("gulp-babel"); | ||
const del = require("del"); | ||
const gulp = require("gulp"); | ||
const mocha = require("gulp-mocha"); | ||
|
||
function clean() { | ||
return del(["lib"]); | ||
} | ||
|
||
function build() { | ||
return gulp.src("src/**/*.js").pipe(babel()).pipe(gulp.dest("lib")); | ||
} | ||
|
||
function test() { | ||
return gulp.src("test/**.js").pipe( | ||
mocha({ | ||
ui: "bdd", | ||
reporter: "spec", | ||
timeout: typeof v8debug === "undefined" ? 2000 : Infinity, // NOTE: disable timeouts in debug | ||
}), | ||
); | ||
} | ||
|
||
exports.clean = clean; | ||
exports.build = gulp.series(clean, build); | ||
exports.test = gulp.series(build, test); |
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,39 @@ | ||
import js from "@eslint/js"; | ||
import prettier from "eslint-config-prettier"; | ||
import mocha from "eslint-plugin-mocha"; | ||
|
||
export default [ | ||
{ | ||
files: ["src/**/*.js"], | ||
languageOptions: { | ||
ecmaVersion: "latest", | ||
sourceType: "module", | ||
}, | ||
rules: { | ||
...prettier.rules, | ||
...js.configs.recommended.rules, | ||
}, | ||
}, | ||
{ | ||
files: ["test/**/*.js"], | ||
plugins: { | ||
mocha, | ||
}, | ||
rules: { | ||
...mocha.configs.recommended.rules, | ||
"mocha/no-exclusive-tests": "error", | ||
"mocha/no-skipped-tests": "warn", | ||
}, | ||
}, | ||
{ | ||
languageOptions: { | ||
globals: { | ||
__dirname: true, | ||
console: true, | ||
exports: true, | ||
module: true, | ||
require: true, | ||
}, | ||
}, | ||
}, | ||
]; |
Oops, something went wrong.