Enable eslint-plugin-jest, eslint-plugin-cypress and wider scan

This commit is contained in:
Matthieu MOREL
2021-11-18 19:17:00 +01:00
committed by MOREL Matthieu
parent 4089ee8786
commit d84be0d792
101 changed files with 2856 additions and 2830 deletions

View File

@@ -3,16 +3,16 @@ import flow from './flow';
import { setConfig } from '../../../config';
setConfig({
securityLevel: 'strict'
securityLevel: 'strict',
});
describe('[Lines] when parsing', () => {
beforeEach(function() {
beforeEach(function () {
flow.parser.yy = flowDb;
flow.parser.yy.clear();
});
it('should handle line interpolation default definitions', function() {
it('should handle line interpolation default definitions', function () {
const res = flow.parser.parse('graph TD\n' + 'A-->B\n' + 'linkStyle default interpolate basis');
const vert = flow.parser.yy.getVertices();
@@ -21,7 +21,7 @@ describe('[Lines] when parsing', () => {
expect(edges.defaultInterpolate).toBe('basis');
});
it('should handle line interpolation numbered definitions', function() {
it('should handle line interpolation numbered definitions', function () {
const res = flow.parser.parse(
'graph TD\n' +
'A-->B\n' +
@@ -37,7 +37,7 @@ describe('[Lines] when parsing', () => {
expect(edges[1].interpolate).toBe('cardinal');
});
it('should handle line interpolation multi-numbered definitions', function() {
it('should handle line interpolation multi-numbered definitions', function () {
const res = flow.parser.parse(
'graph TD\n' + 'A-->B\n' + 'A-->C\n' + 'linkStyle 0,1 interpolate basis'
);
@@ -49,7 +49,7 @@ describe('[Lines] when parsing', () => {
expect(edges[1].interpolate).toBe('basis');
});
it('should handle line interpolation default with style', function() {
it('should handle line interpolation default with style', function () {
const res = flow.parser.parse(
'graph TD\n' + 'A-->B\n' + 'linkStyle default interpolate basis stroke-width:1px;'
);
@@ -60,7 +60,7 @@ describe('[Lines] when parsing', () => {
expect(edges.defaultInterpolate).toBe('basis');
});
it('should handle line interpolation numbered with style', function() {
it('should handle line interpolation numbered with style', function () {
const res = flow.parser.parse(
'graph TD\n' +
'A-->B\n' +
@@ -76,7 +76,7 @@ describe('[Lines] when parsing', () => {
expect(edges[1].interpolate).toBe('cardinal');
});
it('should handle line interpolation multi-numbered with style', function() {
it('should handle line interpolation multi-numbered with style', function () {
const res = flow.parser.parse(
'graph TD\n' + 'A-->B\n' + 'A-->C\n' + 'linkStyle 0,1 interpolate basis stroke-width:1px;'
);
@@ -88,8 +88,8 @@ describe('[Lines] when parsing', () => {
expect(edges[1].interpolate).toBe('basis');
});
describe('it should handle new line type notation', function() {
it('it should handle regular lines', function() {
describe('it should handle new line type notation', function () {
it('it should handle regular lines', function () {
const res = flow.parser.parse('graph TD;A-->B;');
const vert = flow.parser.yy.getVertices();
@@ -98,7 +98,7 @@ describe('[Lines] when parsing', () => {
expect(edges[0].stroke).toBe('normal');
});
it('it should handle dotted lines', function() {
it('it should handle dotted lines', function () {
const res = flow.parser.parse('graph TD;A-.->B;');
const vert = flow.parser.yy.getVertices();
@@ -107,7 +107,7 @@ describe('[Lines] when parsing', () => {
expect(edges[0].stroke).toBe('dotted');
});
it('it should handle dotted lines', function() {
it('it should handle dotted lines', function () {
const res = flow.parser.parse('graph TD;A==>B;');
const vert = flow.parser.yy.getVertices();