cleanup: typos and remove commented out code (#36573)
This commit is contained in:
@ -436,7 +436,7 @@ function createShowCert(app) {
|
||||
);
|
||||
let { completedDate = new Date() } = certChallenge || {};
|
||||
|
||||
// the challange id has been rotated for isDataVisCert
|
||||
// the challenge id has been rotated for isDataVisCert
|
||||
// so we need to check for id 561add10cb82ac38a17513b3
|
||||
if (certType === 'isDataVisCert' && !certChallenge) {
|
||||
console.log('olderId');
|
||||
|
@ -340,7 +340,7 @@ describe('boot/challenge', () => {
|
||||
const mockHomeLocation = 'https://www.example.com';
|
||||
const mockLearnUrl = `${mockHomeLocation}/learn`;
|
||||
|
||||
it('redircts to the learn base url for non-users', async done => {
|
||||
it('redirects to the learn base url for non-users', async done => {
|
||||
const redirectToCurrentChallenge = createRedirectToCurrentChallenge(
|
||||
() => {},
|
||||
{ _homeLocation: mockHomeLocation, _learnUrl: mockLearnUrl }
|
||||
|
@ -105,7 +105,7 @@ describe('request-authorization', () => {
|
||||
const next = sinon.spy();
|
||||
|
||||
expect(() => requestAuthorization(req, res, next)).toThrowError(
|
||||
'Access token is no longer vaild'
|
||||
'Access token is no longer valid'
|
||||
);
|
||||
expect(next.called).toBe(false);
|
||||
});
|
||||
@ -192,7 +192,7 @@ describe('request-authorization', () => {
|
||||
const next = sinon.spy();
|
||||
|
||||
expect(() => requestAuthorization(req, res, next)).toThrowError(
|
||||
'Access token is no longer vaild'
|
||||
'Access token is no longer valid'
|
||||
);
|
||||
expect(next.called).toBe(false);
|
||||
});
|
||||
|
@ -51,10 +51,10 @@ export default ({ jwtSecret = _jwtSecret, getUserById = _getUserById } = {}) =>
|
||||
});
|
||||
}
|
||||
if (!accessToken && error === errorTypes.expiredToken) {
|
||||
throw wrapHandledError(new Error('Access token is no longer vaild'), {
|
||||
throw wrapHandledError(new Error('Access token is no longer valid'), {
|
||||
type: 'info',
|
||||
redirect: `${homeLocation}/signin`,
|
||||
message: 'Access token is no longer vaild',
|
||||
message: 'Access token is no longer valid',
|
||||
status: 403
|
||||
});
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ const logOnce = createLogOnce();
|
||||
|
||||
boot(app, __dirname, err => {
|
||||
if (err) {
|
||||
// rethrowing the error here bacause any error thrown in the boot stage
|
||||
// rethrowing the error here because any error thrown in the boot stage
|
||||
// is silent
|
||||
logOnce('The below error was thrown in the boot stage');
|
||||
throw err;
|
||||
|
@ -20,15 +20,6 @@ import {
|
||||
ns as searchNameSpace
|
||||
} from '../components/search/redux';
|
||||
|
||||
// console.log({
|
||||
// [appNameSpace]: app,
|
||||
// [challengeNameSpace]: challenge,
|
||||
// [curriculumMapNameSpace]: curriculumMap,
|
||||
// [flashNameSpace]: flash,
|
||||
// form: formReducer,
|
||||
// [searchNameSpace]: search,
|
||||
// [settingsNameSpace]: settings
|
||||
// });
|
||||
export default combineReducers({
|
||||
[appNameSpace]: app,
|
||||
[challengeNameSpace]: challenge,
|
||||
|
Reference in New Issue
Block a user