-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
41 lines (37 loc) · 1.86 KB
/
index.html
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
<html>
<head>
<meta name="description" content="JS Engineer Code Challenge" /><html>
<head>
<title>Coding Challenge</title>
</head>
<body>
<h1>Terms of the Exercise</h1>
<ul>
<li>You can take as long as you like to complete the exercise, but for an indicative timescale we expect a senior engineer can accomplish this in a couple of hours.</li>
<li>You may use online resources to assist you with specific techniques.</li>
<li>You may use existing libraries to avoid re-writing common utilities (e.g. each, map, reduce, etc.), but expect to be questioned on how the library implements them.</li>
</ul>
<h1>The Challenge</h1>
<p>
The aim of the exercise is to demonstrate your problem solving and understanding of JavaScript by implementing something found in every unit testing tool - an "assertEquals" method.</p>
<ul>
<li>Fill in the "assertEquals" function such that it will correctly compare the passed "expected" vs "actual" parameters.</li>
<li>You may add more functions.</li>
<li>Credit will be given for approach, correctly identifying "failed" assertEquals, "clean" code and coding style.</li>
</ul>
<h1>Expected Result</h1>
The following tests should "fail": <strong>02, 03, 04, 07, 08 and 09</strong> - and the failures should be reported using the provided mechanism.<br/>
Ideally the failure messages should report further information:
<ul class="expected">
<li>Test 02: Expected "abcdef" found "abc"</li>
<li>Test 03: Expected type Array but found Object</li>
<li>Test 04: Expected array length 2 but found 3</li>
<li>Test 07: Expected propB.propA[1].propB "b" but found "c"</li>
<li>Test 08: Expected propB.propC but was not found</li>
<li>Test 09: Expected type null but found type Object</li>
</ul>
<h1>Output</h1>
<ul class="output" id="messages"></ul>
</body>
<script type="text/javascript" src="action.js"></script>
</html>