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
import * as actions from './index'; | |
describe("auth actions", () => { | |
it("should equal login with password request", () => { | |
expect(actions.LOGIN_WITH_PWD).toEqual({ | |
"REQUEST": "LOGIN_WITH_PWD_REQUEST", | |
"SUCCESS": "LOGIN_WITH_PWD_SUCCESS", | |
"FAILURE": "LOGIN_WITH_PWD_FAILURE" | |
}); | |
}); |
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
// in src/log.js | |
const log = BaseComponent => props => { | |
console.log(`Rendering ${BaseComponent.name}`); | |
return <BaseComponent {…props} />; | |
} | |
export default log; | |
// in src/MyComponent.js | |
import log from ‘./log’; | |
export default log(MyComponent); |