-
-
Notifications
You must be signed in to change notification settings - Fork 77
/
.markbot.yml
66 lines (59 loc) · 1.67 KB
/
.markbot.yml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
repo: "phrasal-template-generator"
canvasCourse: javascript
naming: true
restrictFileTypes: true
liveWebsite: true
git:
numCommits: 2
allCommitted: true
allSynced: true
html:
- path: "index.html"
valid: true
bestPractices: true
has:
- 'script[src="js/main.js"]'
hasNot:
- ["link", "CSS isn’t necessary to complete this assignment"]
- [
"body :not(script)",
"The `<script>` tag should be the only tag inside `<body>` — no other HTML is needed",
]
js:
- path: "js/main.js"
valid: true
bestPractices: true
search:
- "var"
- "alert"
- "prompt"
- "(if|switch)"
- "document.write"
- "\\\\n"
- "Let’s make a story together!"
- "A colour"
- "A creature"
- "An adjective"
- "A past tense verb"
- "Which story would you like?"
- "After snacking"
- "Amelia"
- "Jackson chose"
functionality:
- path: "index.html"
setup: |
window.__promptResponsies = [
'indigo',
'dragon',
'delicious',
'burped',
'a',
];
window.prompt = function () {
return window.__promptResponsies.shift();
}
tests:
- |
let expectedResult = 'After snacking on delicious treats, the indigo bellied dragon burped for hours.';
if (document.body.textContent.trim() !== expectedResult) fail(`The story that was written out did not match what was expected. Story \`a\` was tested with the following words: \`indigo\` (colour), \`dragon\` (creature), \`delicious\` (adjective), \`burped\` (verb). This is the expected output: **“${expectedResult}”**`);
pass();