-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
144 changed files
with
4,114 additions
and
1,461 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
repo_token: COVERALLS_REPO_TOKEN | ||
repo_token: RF9Gn0DcrIITCfsdfz4hrfRUC2kUGq0qF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
/server/docs | ||
/server/test | ||
/dist | ||
/client/__tests__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
language: node_js | ||
node_js: | ||
- "6" | ||
- "8" | ||
env: | ||
global: | ||
- export NODE_ENV=test | ||
before_script: | ||
- npm install -g codeclimate-test-reporter | ||
script: | ||
- npm test | ||
after_success: | ||
- codeclimate-test-reporter < coverage/lcov.info | ||
- npm run coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import Notify from '../../actions/Notify'; | ||
|
||
Notify.success = jest.spyOn(Notify, 'success'); | ||
Notify.error = jest.spyOn(Notify, 'error'); | ||
|
||
export default Notify; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
const localStorage = { | ||
const mockLocalStorage = { | ||
store: {}, | ||
setItem(key, value) { | ||
return ({ ...localStorage.store, [key]: value }); | ||
return ({ ...mockLocalStorage.store, [key]: value }); | ||
}, | ||
getItem(key) { | ||
return localStorage.store[key]; | ||
return mockLocalStorage.store[key]; | ||
}, | ||
removeItem(key) { | ||
delete localStorage.store[key]; | ||
delete mockLocalStorage.store[key]; | ||
}, | ||
clear() { | ||
localStorage.store = {}; | ||
mockLocalStorage.store = {}; | ||
} | ||
}; | ||
|
||
export default localStorage; | ||
export default mockLocalStorage; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
let mockDelay; | ||
let mockError; | ||
let mockResponse = { | ||
status() { | ||
return 200; | ||
}, | ||
ok: true, | ||
get: jest.genMockFunction(), | ||
toError: jest.genMockFunction(), | ||
data: { message: 'success' } | ||
}; | ||
|
||
const request = { | ||
post: jest.genMockFunction().mockReturnThis(), | ||
get: jest.genMockFunction().mockReturnThis(), | ||
send: jest.genMockFunction().mockReturnThis(), | ||
query: jest.genMockFunction().mockReturnThis(), | ||
field: jest.genMockFunction().mockReturnThis(), | ||
set: jest.genMockFunction().mockReturnThis(), | ||
accept: jest.genMockFunction().mockReturnThis(), | ||
timeout: jest.genMockFunction().mockReturnThis(), | ||
end: jest.genMockFunction().mockImplementation(function cb(callback) { | ||
if (mockDelay) { | ||
this.delayTimer = setTimeout(callback, 0, mockError, mockResponse); | ||
return; | ||
} | ||
|
||
callback(mockError, mockResponse); | ||
}), | ||
|
||
__setMockDelay(boolValue) { | ||
mockDelay = boolValue; | ||
}, | ||
__setMockResponse(mockRes) { | ||
mockResponse = mockRes; | ||
}, | ||
__setMockError(mockErr) { | ||
mockError = mockErr; | ||
}, | ||
__setMockResponseBody(body) { | ||
mockResponse.body = body; | ||
} | ||
}; | ||
|
||
export default request; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.