Skip to content

aethiss/justatest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

PLEASE README

Download on the same folder index.html AND action.js, just double click on index.html to test.

I used only standard javascript (no libraries like underscore or similar) to finish this test. Time needed, around 40minutes (with coffie & cigarette).


Terms of the Exercise

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. You may use online resources to assist you with specific techniques. 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. The Challenge

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.

Fill in the "assertEquals" function such that it will correctly compare the passed "expected" vs "actual" parameters. You may add more functions. Credit will be given for approach, correctly identifying "failed" assertEquals, "clean" code and coding style. Expected Result

The following tests should "fail": 02, 03, 04, 07, 08 and 09 - and the failures should be reported using the provided mechanism. Ideally the failure messages should report further information: Test 02: Expected "abcdef" found "abc" Test 03: Expected type Array but found Object Test 04: Expected array length 2 but found 3 Test 07: Expected propB.propA[1].propB "b" but found "c" Test 08: Expected propB.propC but was not found Test 09: Expected type null but found type Object Output

About

javacript test

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published