chore: fixup linting the api tests
This commit is contained in:
committed by
Stuart Taylor
parent
1faa8dc0c1
commit
58edfce838
@ -41,6 +41,7 @@ describe('boot/challenge', () => {
|
|||||||
expect(result).toHaveProperty('updateData.$set.completedChallenges');
|
expect(result).toHaveProperty('updateData.$set.completedChallenges');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// eslint-disable-next-line max-len
|
||||||
it('preserves file contents if the completed challenge is a JS Project', () => {
|
it('preserves file contents if the completed challenge is a JS Project', () => {
|
||||||
const jsChallengeId = 'aa2e6f85cab2ab736c9a9b24';
|
const jsChallengeId = 'aa2e6f85cab2ab736c9a9b24';
|
||||||
const completedChallenge = {
|
const completedChallenge = {
|
||||||
@ -86,6 +87,7 @@ describe('boot/challenge', () => {
|
|||||||
expect(firstCompletedChallenge.completedDate).toEqual(originalCompletion);
|
expect(firstCompletedChallenge.completedDate).toEqual(originalCompletion);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// eslint-disable-next-line max-len
|
||||||
it('does not attempt to update progressTimestamps for a previously completed challenge', () => {
|
it('does not attempt to update progressTimestamps for a previously completed challenge', () => {
|
||||||
const completedChallengeId = 'aaa48de84e1ecc7c742e1124';
|
const completedChallengeId = 'aaa48de84e1ecc7c742e1124';
|
||||||
const completedChallenge = {
|
const completedChallenge = {
|
||||||
@ -105,6 +107,7 @@ describe('boot/challenge', () => {
|
|||||||
expect(hasProgressTimestamps).toBe(false);
|
expect(hasProgressTimestamps).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// eslint-disable-next-line max-len
|
||||||
it('provides a progressTimestamps update for new challenge completion', () => {
|
it('provides a progressTimestamps update for new challenge completion', () => {
|
||||||
expect.assertions(2);
|
expect.assertions(2);
|
||||||
const { updateData } = buildUserUpdate(
|
const { updateData } = buildUserUpdate(
|
||||||
@ -140,6 +143,7 @@ describe('boot/challenge', () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// eslint-disable-next-line max-len
|
||||||
it('adds newly completed challenges to the completedChallenges array', () => {
|
it('adds newly completed challenges to the completedChallenges array', () => {
|
||||||
const {
|
const {
|
||||||
updateData: {
|
updateData: {
|
||||||
|
@ -42,6 +42,7 @@ export const mockCompletedChallenges = [
|
|||||||
files: [
|
files: [
|
||||||
{
|
{
|
||||||
contents:
|
contents:
|
||||||
|
// eslint-disable-next-line max-len
|
||||||
"function palindrome(str) {\n const clean = str.replace(/[\\W_]/g, '').toLowerCase()\n const revStr = clean.split('').reverse().join('');\n return clean === revStr;\n}\n\n\n\npalindrome(\"eye\");\n",
|
"function palindrome(str) {\n const clean = str.replace(/[\\W_]/g, '').toLowerCase()\n const revStr = clean.split('').reverse().join('');\n return clean === revStr;\n}\n\n\n\npalindrome(\"eye\");\n",
|
||||||
ext: 'js',
|
ext: 'js',
|
||||||
path: 'index.js',
|
path: 'index.js',
|
||||||
|
Reference in New Issue
Block a user