mirror of
https://github.com/cypress-io/cypress.git
synced 2026-04-29 11:32:15 -05:00
fix eslint for fixture specs (#5176)
* update eslint to lint files within 'fixtures' in support files - ignore some edge cases like jquery, jsx and obvious js files we wrote with broken code * Fixes from eslint to 'fixtures' files
This commit is contained in:
committed by
Ben Kucera
parent
7100a419f8
commit
b5b79fc9af
+6
-1
@@ -7,7 +7,12 @@
|
||||
**/dist
|
||||
**/dist-test
|
||||
**/node_modules
|
||||
**/support/fixtures
|
||||
**/support/fixtures/*
|
||||
!**/support/fixtures/projects
|
||||
**/support/fixtures/projects/**/_fixtures/*
|
||||
**/support/fixtures/projects/**/*.jsx
|
||||
**/support/fixtures/projects/**/jquery.js
|
||||
**/support/fixtures/projects/**/fail.js
|
||||
**/test/fixtures
|
||||
**/vendor
|
||||
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import "./does/not/exist"
|
||||
import './does/not/exist'
|
||||
|
||||
+1
@@ -1 +1,2 @@
|
||||
/* eslint-disable mocha/no-global-tests */
|
||||
it('works', () => {})
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import "../../lib/fail"
|
||||
import '../../lib/fail'
|
||||
|
||||
+1
@@ -23,6 +23,7 @@ describe('https passthru retries', () => {
|
||||
img.onload = () => {
|
||||
reject(new Error('onload event fired, but should not have. expected onerror to fire.'))
|
||||
}
|
||||
|
||||
img.onerror = resolve
|
||||
})
|
||||
})
|
||||
|
||||
+2
@@ -27,8 +27,10 @@ describe('network error handling', function () {
|
||||
})
|
||||
.get('input[type=text]')
|
||||
.type('bar')
|
||||
|
||||
cy.get('input[type=submit]')
|
||||
.click()
|
||||
|
||||
cy.contains('{"foo":"bar"}')
|
||||
})
|
||||
})
|
||||
|
||||
@@ -101,6 +101,7 @@ module.exports = (on) => {
|
||||
|
||||
'record:fast_visit_spec' ({ percentiles, url, browser, currentRetry }) {
|
||||
percentiles.forEach(([percent, percentile]) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(`${percent}%\t of visits to ${url} finished in less than ${percentile}ms`)
|
||||
})
|
||||
|
||||
@@ -110,8 +111,9 @@ module.exports = (on) => {
|
||||
currentRetry,
|
||||
...percentiles.reduce((acc, pair) => {
|
||||
acc[pair[0]] = pair[1]
|
||||
|
||||
return acc
|
||||
}, {})
|
||||
}, {}),
|
||||
}
|
||||
|
||||
return performance.track('fast_visit_spec percentiles', data)
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
console.log("bar")
|
||||
/* eslint-disable no-console */
|
||||
console.log('bar')
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
import baz from "./baz"
|
||||
import baz from './baz'
|
||||
|
||||
export default baz
|
||||
export default baz
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export default () => {
|
||||
return "baz"
|
||||
}
|
||||
return 'baz'
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable no-console */
|
||||
module.exports = function Reporter (runner) {
|
||||
runner.on('test end', function (test) {
|
||||
console.log(test.title)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
context("some context[i9w]", function(){
|
||||
context('some context[i9w]', function () {
|
||||
it('tests[abc]')
|
||||
})
|
||||
})
|
||||
|
||||
@@ -1 +1 @@
|
||||
import "./dom.jsx"
|
||||
import './dom.jsx'
|
||||
|
||||
+12
-4
@@ -1,11 +1,19 @@
|
||||
module.exports = (on) => {
|
||||
on('task', {
|
||||
'one' () { return 'one' },
|
||||
'two' () { return 'two' },
|
||||
'one' () {
|
||||
return 'one'
|
||||
},
|
||||
'two' () {
|
||||
return 'two'
|
||||
},
|
||||
})
|
||||
|
||||
on('task', {
|
||||
'two' () { return 'two again' },
|
||||
'three' () { return 'three' },
|
||||
'two' () {
|
||||
return 'two again'
|
||||
},
|
||||
'three' () {
|
||||
return 'three'
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
beforeEach(function(){
|
||||
beforeEach(function () {
|
||||
|
||||
});
|
||||
})
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
it("tests without a server", function(){
|
||||
/* eslint-disable mocha/no-global-tests */
|
||||
it('tests without a server', function () {
|
||||
|
||||
});
|
||||
})
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/* global document */
|
||||
|
||||
const el = document.getElementById('extension')
|
||||
|
||||
if (el) {
|
||||
|
||||
@@ -3,16 +3,22 @@
|
||||
"version": "0",
|
||||
"description": "tests adding user extension into Cypress",
|
||||
"permissions": [
|
||||
"tabs", "webNavigation", "<all_urls>"
|
||||
"tabs",
|
||||
"webNavigation",
|
||||
"<all_urls>"
|
||||
],
|
||||
"content_scripts": [
|
||||
{
|
||||
"matches": ["<all_urls>"],
|
||||
"matches": [
|
||||
"<all_urls>"
|
||||
],
|
||||
"exclude_matches": [
|
||||
"*://*/__cypress/*",
|
||||
"*://*/__/*"
|
||||
],
|
||||
"js": ["background.js"],
|
||||
"js": [
|
||||
"background.js"
|
||||
],
|
||||
"run_at": "document_end",
|
||||
"all_frames": true
|
||||
}
|
||||
|
||||
-2
@@ -1,5 +1,3 @@
|
||||
/* global Promise */
|
||||
|
||||
module.exports = (on) => {
|
||||
on('file:preprocessor', () => {
|
||||
return new Promise(() => {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
it("is truthy", function(){
|
||||
/* eslint-disable mocha/no-global-tests */
|
||||
it('is truthy', function () {
|
||||
expect(true).to.be.true
|
||||
})
|
||||
})
|
||||
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
/* global it, expect */
|
||||
|
||||
/* eslint-disable mocha/no-global-tests */
|
||||
it('is another spec', () => {
|
||||
expect(false).to.be.false
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user