Skip to content

Instantly share code, notes, and snippets.

View Archimidis's full-sized avatar

Nikolas Vourlakis Archimidis

View GitHub Profile
@Archimidis
Archimidis / example-tests-wedotdd.js
Created December 12, 2017 12:18 — forked from dschinkel/example-tests-wedotdd.js
Example Tests from Private Repo for WeDoTDD.com
/*
Tools: mocha, chai-enzyme, jsdom, airbnb enzyme
Using WebStorm test runner and WebStorm to write code.
For the prod code, using Flow for type checking
These are isolated unit tests (not integration) that test behavior for particular React components
A big reason why I like React.js vs Vue, Angular, or other types of frameworks or
libraries is the simplicity at which you can test behavior. Also there's no magic going on here in terms of
@Archimidis
Archimidis / app.js
Created January 11, 2018 08:47
Sample express.js structure
// UserRepository.js -------------------------------------------------------------------------
// ... implementation
module.exports = UserRepository;
// UserService.js -------------------------------------------------------------------------
// ... implementation
module.exports = UserService;