cabana: add comma auth; remove test for dead code; remove isrequired from props

main
Andy Haden 2017-08-07 15:53:21 -07:00
parent a022405b78
commit 8a5719c642
3 changed files with 11 additions and 17 deletions

View File

@ -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,

View File

@ -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);
});

View File

@ -0,0 +1,9 @@
function isAuthenticated() {
return Math.random() < 0.5;
}
function authUrl() {
return window.location;
}
export default {isAuthenticated, authUrl};