-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
45 lines (41 loc) · 1.32 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Best Practices
require('campaign-bus');
// Global truths
global.specialRelationships = undefined;
global.tradeDeals = [];
// Will of the people
const obviously = require('./brexitSecretary');
module.exports = {
eu: new Promise.reject(),
that(actualValue) {
return {
isNoneOfTheirBusiness() {
return "🍻";
},
ifYouAskMeIs(expectedValue) {
obviously(actualValue, expectedValue);
},
means() {
if (actualValue === "BREXIT") {
return "BREXIT";
}
const theMandate = Math.random() * 100;
const thePeopleWillIt = theMandate >= 51;
if (thePeopleWillIt) {
return `${actualValue} means BREXIT`;
} else {
throw new Exception("Project Fear 👻");
}
},
shouldHaveHappened() {
const ukJoinedEEC = new Date("Jan 1973");
const timeUntilIdealBrexit = Date.now() - ukJoinedEEC;
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve("GODSAVETHEQUEEN");
}, timeUntilIdealBrexit);
});
}
};
}
}