Skip to content

Commit

Permalink
v2.2.9
Browse files Browse the repository at this point in the history
v2.2.9
  • Loading branch information
eliselavy authored Nov 26, 2021
2 parents e54ede7 + 146d2f6 commit 4f19fb3
Show file tree
Hide file tree
Showing 9 changed files with 109 additions and 27 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"env": {
"node": true,
"es2021": true,
"browser": true
"browser": true,
"jest": true
},
"extends": [
"eslint:recommended",
Expand Down
38 changes: 33 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jdh",
"version": "2.2.8",
"version": "2.2.9",
"private": true,
"dependencies": {
"@auth0/auth0-react": "^1.1.0",
Expand All @@ -17,7 +17,7 @@
"@visx/curve": "^1.0.0",
"@visx/shape": "^1.3.0",
"array-move": "^3.0.1",
"axios": "^0.21.1",
"axios": "^0.21.2",
"bootstrap": "5.0.0",
"citation-js": "0.5.0",
"d3-array": "^2.9.1",
Expand Down
9 changes: 0 additions & 9 deletions src/App.test.js

This file was deleted.

17 changes: 17 additions & 0 deletions src/pages/About.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from 'react';
import { render } from '@testing-library/react';
import About from './about';


jest.mock('react-i18next', () => ({
useTranslation: () => ({t: key => key})
}));

const expectedContent = 'The Team at the C²DH'

test(`renders /guidelines title "${expectedContent}" correctly`, () => {
const { getByText } = render(<About />);

const headingElement = getByText(expectedContent);
expect(headingElement).toBeInTheDocument();
});
24 changes: 24 additions & 0 deletions src/pages/Guidelines.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import React from 'react';
import { render } from '@testing-library/react';
import Guidelines from './Guidelines';
import source from '../data/mock-api/authorGuideline.json';

jest.mock('react-i18next', () => ({
useTranslation: () => ({t: key => key})
}));

const expectedTitle = source.cells
.filter(d => {
return d.metadata?.tags?.includes('title')
})
.map(d => d.source.join(''))
.join()
.replace(/#\s*/, '')
.trim()

test(`renders /guidelines title "${expectedTitle}" correctly`, () => {
const { getByText } = render(<Guidelines />);

const headingElement = getByText(expectedTitle);
expect(headingElement).toBeInTheDocument();
});
2 changes: 1 addition & 1 deletion src/schemas/Abstract.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"examples": [
"https://orcid.org/0000-0002-0237-2532"
],
"pattern": "^https?://orcid.org/[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{4}$"
"pattern": "^https?://orcid.org/[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9X]{4}$"
},
"isValid": {
"$id": "#/definitions/isValid",
Expand Down
21 changes: 21 additions & 0 deletions src/setupTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,24 @@
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom/extend-expect';


global.IntersectionObserver = class IntersectionObserver {
constructor() {}

disconnect() {
return null;
}

observe() {
return null;
}

takeRecords() {
return null;
}

unobserve() {
return null;
}
};
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3133,12 +3133,12 @@ axe-core@^4.0.2:
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.2.3.tgz#2a3afc332f0031b42f602f4a3de03c211ca98f72"
integrity sha512-pXnVMfJKSIWU2Ml4JHP7pZEPIrgBO1Fd3WGx+fPBsS+KRGhE4vxooD8XBGWbQOIVSZsVK7pUDBBkCicNu80yzQ==

axios@^0.21.1:
version "0.21.1"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8"
integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==
axios@^0.21.2:
version "0.21.2"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.2.tgz#21297d5084b2aeeb422f5d38e7be4fbb82239017"
integrity sha512-87otirqUw3e8CzHTMO+/9kh/FSgXt/eVDvipijwDtEuwbkySWZ9SBm6VEubmJ/kLKEoLQV/POhxXFb66bfekfg==
dependencies:
follow-redirects "^1.10.0"
follow-redirects "^1.14.0"

axobject-query@^2.2.0:
version "2.2.0"
Expand Down Expand Up @@ -5967,10 +5967,10 @@ flush-write-stream@^1.0.0:
inherits "^2.0.3"
readable-stream "^2.3.6"

follow-redirects@^1.0.0, follow-redirects@^1.10.0:
version "1.14.1"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.1.tgz#d9114ded0a1cfdd334e164e6662ad02bfd91ff43"
integrity sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg==
follow-redirects@^1.0.0, follow-redirects@^1.14.0:
version "1.14.5"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.5.tgz#f09a5848981d3c772b5392309778523f8d85c381"
integrity sha512-wtphSXy7d4/OR+MvIFbCVBDzZ5520qV8XfPklSN5QtxuMUJZ+b0Wnst1e1lCDocfzuCkHqj8k0FpZqO+UIaKNA==

for-in@^1.0.2:
version "1.0.2"
Expand Down

0 comments on commit 4f19fb3

Please sign in to comment.