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 StudiesObserver from './StudiesObserver'; | |
beforeEach(()=> { | |
const studiesObserver = new StudiesObserver(); | |
}); | |
test('Changing the StudyBlock.status property should trigger update()', () => { | |
const spy = jest.spyOn(studiesObserver, 'update'); | |
const isUpdating = studiesObserver.update(); | |
expect(spy).toHaveBeenCalled(); |
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
changeDate(direction){ | |
direction === 'next' ? this.dateTimeManager.setToNextDay() : this.dateTimeManager.setToPreviousDay(); | |
} |
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 { bindings } from '../view/bindings'; | |
class Controller { | |
constructor(userData, dateTimeManager, main, bindings){ | |
/**/ | |
this.bindings = bindings.bind(this); | |
} | |
addBindings(){ | |
window.onclick = this.bindings; |
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
> [email protected] build /mnt/c/Users/Aquazi/Desktop/tui | |
> webpack --watch | |
Webpack is watching the files… | |
Hash: e356bf01d0bfe3c154b7 | |
Version: webpack 3.1.0 | |
Time: 692ms | |
Asset Size Chunks Chunk Names |
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
const path = require('path'); | |
const productionConfig = merge([ | |
parts.generateSourceMaps({ type: 'source-map' }), | |
]); | |
module.exports = { | |
entry: './src/app.js', | |
output: { | |
path: path.join(__dirname, 'public'), |
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
days : {}, | |
firstDay:"Mon May 14 2018 00:00:00 GMT+0200 (W. Europe Daylight Time)", | |
lastAccessDay:"Mon May 14 2018 00:00:00 GMT+0200 (W. Europe Daylight Time)", | |
topics:{}, | |
totalSkipped:0, | |
totalStudied:0 |
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
Object.keys(UserData).forEach( key => { window.localStorage.setItem(key.toString(), UserData[key]); }); |
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
test('checks if C topic is in topics', () => { | |
expect(Object.keys(user.topics).toContain('C')); | |
}); |
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
export default class UserData { | |
constructor(days = {}, firstDay = getFirstDay(), lastAccessDay){ | |
this.days = days; | |
this.firstDay = firstDay; | |
this.lastAccessDay = lastAccessDay; | |
} | |
static getFirstDay() { | |
return new Date(); | |
} |
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
render() { | |
const navbarElements = ["hello"]; | |
return ( | |
<div> | |
<p>Welcome to my App</p> | |
<Header navbarBelements={navbarElements} /> | |
</div> | |
); | |
} |