- Notifications
You must be signed in to change notification settings - Fork2k
A test-driven approach to assessing JS skills
rmurphey/js-assessment
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This repo includes a set of tests that can be used to assess the skills ofa candidate for a JavaScript position, or to evaluate and improve one's ownskills.
To use the tests, you will need to installNode. Notethat on Windows, there are some reports that you will need to restartafter installing Node - see #12.
You can clone or download this repo. Once you have done so, from the rootdirectory of the repo, run:
npm installnpm start
You can then view the tests in your browser athttp://localhost:4444.
When you visit that page, all of the tests should be failing; your job is toget the tests to pass. To do this, you'll need to refer to the tests in thefiles in thetests/app
directory, and edit the files in theapp/
directory.Once you update a test, you can reload the test page in the browser to seewhether it worked.
You can also run (most of) the tests on the command line:
npm test
The command line runner is a work in progress; contributions welcome :)
The repo includes jQuery, Backbone, and Underscore. You can use theselibraries when writing your solutions!
Submit a pull request! The tests are currently loosely organized by topic, soyou should do your best to add tests to the appropriate file intests/app
, orcreate a new file there if you don't see an appropriate one. If you do createa new file, make sure to add it totests/runner.js
, and to add a stub for thesolution to the corresponding file inapp/
. Finally, it would be great if youcould update theanswersas well.
If you're not sure how or where to add a test, please open an issue.
If your tests need data that can be fetched via XHR, stick a.json
file inthedata
directory; you can access it at/data/<filename>.json
.
First, bear in mind that looking up the answers is going to teach you a wholelot less than you'll learn by working on the tests, even if you occasionally getstuck. I'd recommend only looking at the answers once you have the testspassing, to see if there's another way you could have approached theproblem. When you're ready to look at the answers, you can find themhere; I'll do my best tokeep them up to date.
This repo usesMocha andChai for the tests themselves. It uses the BDD style for authoring tests.If this doesn't suit you, please fork away, or, better, submit a pull request that letsthis be more flexible than it currently is.
There are a number of things that would make this project better; check out theissues for details, pullrequests welcome!
Copyright © 2012-2016 Rebecca Murphey with many thanks to severalcontributors.
This work is licensed under aCreative Commons Attribution-ShareAlike 4.0 International License.
About
A test-driven approach to assessing JS skills
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.