• Stars
    star
    5,155
  • Rank 7,839 (Top 0.2 %)
  • Language
    JavaScript
  • Created about 12 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A test-driven approach to assessing JS skills

Build Status

A test-driven JS assessment

This repo includes a set of tests that can be used to assess the skills of a candidate for a JavaScript position, or to evaluate and improve one's own skills.

I want to work on the tests; what do I do?

To use the tests, you will need to install Node. Note that on Windows, there are some reports that you will need to restart after installing Node - see #12.

You can clone or download this repo. Once you have done so, from the root directory of the repo, run:

npm install
npm start

You can then view the tests in your browser at http://localhost:4444.

When you visit that page, all of the tests should be failing; your job is to get the tests to pass. To do this, you'll need to refer to the tests in the files in the tests/app directory, and edit the files in the app/ directory. Once you update a test, you can reload the test page in the browser to see whether 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 :)

Available dependencies

The repo includes jQuery, Backbone, and Underscore. You can use these libraries when writing your solutions!

I want to contribute tests; what do I do?

Submit a pull request! The tests are currently loosely organized by topic, so you should do your best to add tests to the appropriate file in tests/app, or create a new file there if you don't see an appropriate one. If you do create a new file, make sure to add it to tests/runner.js, and to add a stub for the solution to the corresponding file in app/. Finally, it would be great if you could update the answers as well.

If you're not sure how or where to add a test, please open an issue.

Data-driven tests

If your tests need data that can be fetched via XHR, stick a .json file in the data directory; you can access it at /data/<filename>.json.

I want to see the answers!

First, bear in mind that looking up the answers is going to teach you a whole lot less than you'll learn by working on the tests, even if you occasionally get stuck. I'd recommend only looking at the answers once you have the tests passing, to see if there's another way you could have approached the problem. When you're ready to look at the answers, you can find them here; I'll do my best to keep them up to date.

I hate <some technology you've chosen>

This repo uses Mocha and Chai 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 lets this be more flexible than it currently is.

Todos

There are a number of things that would make this project better; check out the issues for details, pull requests welcome!

License

Copyright © 2012-2016 Rebecca Murphey with many thanks to several contributors.

Creative Commons License

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

More Repositories

1

jqfundamentals

Code repository for jQuery Fundamentals training
JavaScript
1,170
star
2

srchr-demo

JavaScript
150
star
3

js-assessment-answers

JavaScript
125
star
4

testable-javascript

JavaScript
118
star
5

chrome-http2-log-parser

JavaScript
115
star
6

dojo-demo

Using the Dojo Toolkit for MVC JavaScript applications
JavaScript
56
star
7

ffco

Functionality-Focused Code Organization
JavaScript
44
star
8

srchr

A crowdsourced JavaScript exercise
43
star
9

bvjs

JavaScript
41
star
10

js-minty-fresh

JavaScript
29
star
11

large-jquery-apps

Demo for jQuery code org talk
JavaScript
26
star
12

dojo-scaffold

Scaffolding a Buildable Dojo Application
JavaScript
22
star
13

frontend-dev-baseline

JavaScript
17
star
14

refactor-jquery

Cleaner, Leaner, Meaner: Refactoring Your jQuery
JavaScript
17
star
15

jquery-module

Module creation and loading for jQuery
JavaScript
16
star
16

dotfiles

Vim Script
16
star
17

js-testing-boilerplates

JavaScript
15
star
18

object-literals

Object Literals Example Code
JavaScript
14
star
19

jQuery-201

JavaScript
9
star
20

johnny-five-projects

JavaScript
9
star
21

dojo-sandbox

Sandbox for Dojo presentations
JavaScript
8
star
22

mulberry

Home of Toura Mulberry, tools and a framework for quickly producing cross-platform mobile applications using Javascript, HTML, CSS, and PhoneGap
JavaScript
8
star
23

txjs-site

Website for TXJS
PHP
7
star
24

srchr-ember

srchr-ember
JavaScript
6
star
25

rmurphey.github.com

HTML
6
star
26

responsive-ui

Delivering a Responsive UI
5
star
27

blog-octopress

JavaScript
5
star
28

js-games

JavaScript
5
star
29

ttlpodcast.com

CSS
5
star
30

arduino-display

JavaScript
4
star
31

jQuery-Fundamentals-Temp

JavaScript
4
star
32

dojo-transformers

A Dojo demo centered around transformers
JavaScript
3
star
33

js-sandbox

JavaScript
3
star
34

ffconf-mulberry-demo

JavaScript
3
star
35

dojo-boilerplate

3
star
36

olivercam

JavaScript
3
star
37

mustache-cats

Mulberry app for Cats with Mustaches!
JavaScript
2
star
38

sandbox

2
star
39

mulberry-demos

Demo apps for mulberry
JavaScript
2
star
40

blog-jekyll

Ruby
2
star
41

jmvc-sandbox

Sandbox for JavaScriptMVC demos
2
star
42

project-euler

My (undoubtedly sub-optimal) answers to the Project Euler questions
Ruby
2
star
43

wtf3pjs

JavaScript
1
star
44

flitter

test csv data against yaml-specified conditions
Ruby
1
star
45

shoppingbot

JavaScript
1
star
46

js-games-server

JavaScript
1
star