Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate CI from Travis to Github Actions #685

Merged
merged 23 commits into from Feb 11, 2021
Merged
Changes from 1 commit
Commits
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

clean up unit test logging

  • Loading branch information
christophertino committed Feb 10, 2021
commit 6406da8c04a9c125785400bce12024a66026beaa
@@ -128,7 +128,6 @@ export function prefsGet(...args) {
* @return {Promise} prefs object which has been set, or error
*/
export function prefsSet(prefs) {
log('PREFS SET', prefs);
This conversation was marked as resolved by wlycdgr

This comment has been minimized.

@wlycdgr

wlycdgr Feb 10, 2021
Member

That's been there since 2018, are we sure we want to remove? log outputs in debug mode only (although looks like you removed it so it doesn't break the Jest setup file test?)

This comment has been minimized.

@wlycdgr

wlycdgr Feb 10, 2021
Member

sounds like Tino removed it, so since he's the one who put it there in the first place, nvm, heh

return new Promise(((resolve, reject) => {
if (typeof prefs !== 'undefined') {
chrome.storage.local.set(prefs, () => {
@@ -19,8 +19,17 @@ import { enableFetchMocks } from 'jest-fetch-mock';
import Enzyme from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';

Enzyme.configure({ adapter: new Adapter() });
// Disable logging
jest.mock('../src/utils/common', () => {
const commonActual = jest.requireActual('../src/utils/common');
return {
...commonActual,
log: () => false,
};
});

enableFetchMocks();
Enzyme.configure({ adapter: new Adapter() });

// Fake the translation function to only return the translation key
global.t = function(str) {
@@ -11,7 +11,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0
*/

import { prefsSet, prefsGet } from '../../src/utils/common';
import { prefsGet } from '../../src/utils/common';

describe('tests for prefsGet()', () => {
// Setup prefsGet() by initializing chrome.storage.local.get()
ProTip! Use n and p to navigate between commits in a pull request.