cabana: add comma auth; remove test for dead code; remove isrequired from props
parent
a022405b78
commit
8a5719c642
|
@ -29,8 +29,8 @@ import {hash} from './utils/string';
|
|||
|
||||
export default class CanExplorer extends Component {
|
||||
static propTypes = {
|
||||
dongleId: PropTypes.string.isRequired,
|
||||
name: PropTypes.string.isRequired,
|
||||
dongleId: PropTypes.string,
|
||||
name: PropTypes.string,
|
||||
dbc: PropTypes.instanceOf(DBC),
|
||||
dbcFilename: PropTypes.string,
|
||||
githubAuthToken: PropTypes.string,
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
import {elementWiseEquals} from '../../utils/array';
|
||||
|
||||
test('elementWiseEquals returns true for two arrays with same elements', () => {
|
||||
const arr1 = [1,2,3];
|
||||
const arr2 = [1,2,3];
|
||||
|
||||
expect(elementWiseEquals(arr1, arr2)).toBe(true);
|
||||
});
|
||||
|
||||
test('elementWiseEquals returns false for two arrays with different elements', () => {
|
||||
const arr1 = [1,2,3,4];
|
||||
const arr2 = [1,2,3];
|
||||
|
||||
expect(elementWiseEquals(arr1, arr2)).toBe(false);
|
||||
});
|
|
@ -0,0 +1,9 @@
|
|||
function isAuthenticated() {
|
||||
return Math.random() < 0.5;
|
||||
}
|
||||
|
||||
function authUrl() {
|
||||
return window.location;
|
||||
}
|
||||
|
||||
export default {isAuthenticated, authUrl};
|
Loading…
Reference in New Issue