chore(deps): upgrade eslint, prettier & related packages

This commit is contained in:
Mrugesh Mohapatra
2021-03-11 00:31:46 +05:30
committed by Mrugesh Mohapatra
parent 0a53a1d7f0
commit 6c91f81b0e
94 changed files with 1462 additions and 1411 deletions

View File

@ -15,7 +15,7 @@ const unhandledErrorMessage = 'Something is not quite right';
const runningOutput = '// running tests';
const finishedOutput = '// tests completed';
describe('Backend challenge', function() {
describe('Backend challenge', function () {
it('renders', () => {
cy.visit(locations.index);

View File

@ -23,7 +23,7 @@ const defaultOutput = `
// const runningOutput = '// running tests';
// const finishedOutput = '// tests completed';
describe('Classic challenge', function() {
describe('Classic challenge', function () {
it('renders', () => {
cy.visit(locations.index);

View File

@ -12,7 +12,7 @@ const selectors = {
let appHasStarted;
function spyOnListener(win) {
const addListener = win.EventTarget.prototype.addEventListener;
win.EventTarget.prototype.addEventListener = function(name) {
win.EventTarget.prototype.addEventListener = function (name) {
if (name === 'click') {
appHasStarted = true;
win.EventTarget.prototype.addEventListener = addListener;
@ -68,9 +68,7 @@ describe('Navbar', () => {
() => {
cy.get(selectors.menuButton).click();
cy.get(selectors.navigationLinks).contains('Forum');
cy.get(selectors.navigationLinks)
.contains('Curriculum')
.click();
cy.get(selectors.navigationLinks).contains('Curriculum').click();
cy.url().should('include', '/learn');
cy.get(selectors.navigationLinks).contains('Curriculum');
cy.get(selectors.navigationLinks).contains('Forum');
@ -84,9 +82,7 @@ describe('Navbar', () => {
() => {
cy.contains(selectors.smallCallToAction, 'Sign in');
cy.get(selectors.menuButton).click();
cy.get(selectors.navigationLinks)
.contains('Curriculum')
.click();
cy.get(selectors.navigationLinks).contains('Curriculum').click();
cy.contains(selectors.smallCallToAction, 'Sign in');
}
);
@ -95,9 +91,7 @@ describe('Navbar', () => {
cy.login();
cy.get('a[href*="/settings"]').should('be.visible');
cy.get(selectors.menuButton).click();
cy.get(selectors.navigationLinks)
.contains('Profile')
.click();
cy.get(selectors.navigationLinks).contains('Profile').click();
cy.url().should('include', '/developmentuser');
});

View File

@ -30,17 +30,13 @@ describe('Search bar', () => {
it('Should accept input and display hits', () => {
search('freeCodeCamp');
cy.get('.ais-Hits-list')
.children()
.should('to.have.length.of.at.least', 1);
cy.get('.ais-Hits-list').children().should('to.have.length.of.at.least', 1);
});
it('Should clear hits when input is cleared', () => {
search('freeCodeCamp');
cy.get('.ais-Hits-list')
.children()
.should('to.have.length.of.at.least', 1);
cy.get('.ais-Hits-list').children().should('to.have.length.of.at.least', 1);
clear();
@ -52,9 +48,7 @@ describe('Search bar', () => {
search('freeCodeCamp');
cy.get('.ais-Hits-list')
.children()
.should('to.have.length.of', 8);
cy.get('.ais-Hits-list').children().should('to.have.length.of', 8);
});
it('Should show up to 5 hits when height < 768px', () => {
@ -62,17 +56,13 @@ describe('Search bar', () => {
search('freeCodeCamp');
cy.get('.ais-Hits-list')
.children()
.should('to.have.length.of', 5);
cy.get('.ais-Hits-list').children().should('to.have.length.of', 5);
});
it('Should show no hits for queries that do not exist in the Algolia index', () => {
search('testtttt');
cy.get('.ais-Hits-list')
.children()
.should('to.have.length.of', 0);
cy.get('.ais-Hits-list').children().should('to.have.length.of', 0);
cy.contains('No tutorials found');
});

View File

@ -1,11 +1,11 @@
/* global cy */
describe('The `Update my account settings` button works properly', function() {
describe('The `Update my account settings` button works properly', function () {
beforeEach(() => {
cy.login();
});
it('Should take user to their account settings when clicked', function() {
it('Should take user to their account settings when clicked', function () {
cy.contains('Update my account settings').click();
cy.url().should('include', '/settings');
});

View File

@ -13,7 +13,7 @@ const locations = {
'/learn/responsive-web-design/basic-html-and-html5/say-hello-to-html-elements'
};
describe('challenges/superblock redirect', function() {
describe('challenges/superblock redirect', function () {
it('redirects to learn/superblock', () => {
cy.visit(locations.chalSuper);
@ -24,7 +24,7 @@ describe('challenges/superblock redirect', function() {
});
});
describe('challenges/superblock/block redirect', function() {
describe('challenges/superblock/block redirect', function () {
it('redirects to learn/superblock/block', () => {
cy.visit(locations.chalBlock);
@ -35,7 +35,7 @@ describe('challenges/superblock/block redirect', function() {
});
});
describe('challenges/superblock/block/challenge redirect', function() {
describe('challenges/superblock/block/challenge redirect', function () {
it('redirects to learn/superblock/block/challenge', () => {
cy.visit(locations.chalChallenge);

View File

@ -61,7 +61,7 @@ const warningMessage =
'If the tests fail, try disabling your extensions for the most reliable ' +
'experience.';
describe('Basic Css Introduction page', function() {
describe('Basic Css Introduction page', function () {
it('renders', () => {
cy.visit(locations.index);