Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Self Assessment #3

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5bbd68c
(chore) Pend non required tests
harveysanders Jun 28, 2018
3f131bd
adds gitignore & package.json
jaykindell Sep 10, 2018
d5c8c05
reporter - json
jaykindell Sep 10, 2018
9addd59
adds tests in /tests
jaykindell Sep 10, 2018
a33c772
adds exports for testing
jaykindell Sep 11, 2018
d8cecf8
just the package-lock
jaykindell Sep 11, 2018
043dfd4
requires exercise modules in tests
jaykindell Sep 11, 2018
a2492de
Merge pull request #24 from OperationSpark/feat/nodeTests
Sep 11, 2018
b04e257
adds karma config & global location variable
jaykindell Oct 23, 2018
3401210
remove folder with node tests
jaykindell Oct 23, 2018
11e229c
Merge pull request #31 from OperationSpark/feat/karmaTest
harveysanders Oct 24, 2018
9060734
(chore) Add mocha test script
cainwatson Nov 28, 2018
27a3fa5
(chore) Use test:travis cmd in travis yml
cainwatson Nov 28, 2018
99562bc
(chore) Add test files
cainwatson Nov 28, 2018
4101afb
(fix) Use proxies for node recursion callCount
cainwatson Nov 28, 2018
fc0f7a9
(cleanup) Change createProxy to createSpyProxy + update wording
cainwatson Nov 28, 2018
a56687b
(fix) Use plain mocha for travis intead of karma
cainwatson Nov 28, 2018
4d39579
Remove pending tests
cainwatson Nov 28, 2018
2d5eb31
Add where students work in README
cainwatson Nov 28, 2018
28b163c
(chore) Remve old os tool setup
Dec 10, 2018
32fc0f9
(chore) Use yarn test in for travis
Dec 10, 2018
21410ac
Merge pull request #32 from OperationSpark/os-grading
Dec 10, 2018
260265d
fix: Not destructuring for c9 node version
Jan 26, 2019
1e58052
Fix #35 to run test instead of showing as pending
Sep 9, 2019
e0c4dc0
update to run prompt 35
Sep 9, 2019
ed13b14
remove extra declaration of `numToText`
Sep 12, 2019
73f66c2
fix test file
Sep 12, 2019
bda8877
fix const assignment for numToText
Sep 12, 2019
628487e
fix proxy for numToText
Sep 12, 2019
7abc2e1
Update recursion.js
RyGuy-Coder Feb 7, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
language: node_js
node_js:
- "7"
dist: trusty # needs Ubuntu Trusty
cache:
yarn: true
directories:
- node_modules
install:
- yarn
script:
- yarn test
notifications:
webhooks: https://greenlight.operationspark.org/api/v2/webhooks/travisci
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Recursion Prompts
- This is a repository of prompts to be solved using recursion
- This is a repository of prompts to be solved using recursion inside of `src/recursion.js`
- Please refrain from sharing solutions
- Try to solve prompts first using pseudocode
- This repo requires that the overall function itself is called recursively and pays no attention to subroutines called recursively.
Expand Down
4 changes: 2 additions & 2 deletions SpecRunner.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>Recursion Test Suite</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="lib/css/mocha.css" />
<script src="lib/jquery.js"></script>
<!-- <script src="lib/jquery.js"></script> -->
<script src="lib/chai.js"></script>
<script src="lib/mocha.js"></script>
<script src="lib/sinon.js"></script>
Expand All @@ -29,7 +29,7 @@
});
</script>
<script src="spec/part1.js"></script>
<script src="spec/part2.js"></script>
<!-- <script src="spec/part2.js"></script> -->
<!-- End test files -->
</head>
<body>
Expand Down
1 change: 1 addition & 0 deletions lib/location.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
window.inKarma = true;
30 changes: 16 additions & 14 deletions lib/testSupport.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
(function() {
(function () {
'use strict';

mocha.setup({ ui: 'bdd', reporter: cardboard });
window.inKarma ? mocha.setup({ ui: 'tdd', reporter: cardboard }) : mocha.setup({ ui: 'bdd', reporter: cardboard });
// console.log(window.inKarma);
// mocha.setup({ reporter: cardboard });
window.expect = chai.expect;

window.onload = function() {
window.onload = function () {
window.mochaPhantomJS ? mochaPhantomJS.run() : mocha.run();
};

// Disabling native methods is dangerous, we should spy on them instead
before(function() {
sinon.spy(Array.prototype,'map');
sinon.spy(Array.prototype,'indexOf');
sinon.spy(Array.prototype,'forEach');
sinon.spy(Array.prototype,'filter');
sinon.spy(Array.prototype,'reduce');
sinon.spy(Array.prototype,'every');
sinon.spy(Array.prototype,'some');
sinon.spy(Array.prototype,'sort');
before(function () {
sinon.spy(Array.prototype, 'map');
sinon.spy(Array.prototype, 'indexOf');
sinon.spy(Array.prototype, 'forEach');
sinon.spy(Array.prototype, 'filter');
sinon.spy(Array.prototype, 'reduce');
sinon.spy(Array.prototype, 'every');
sinon.spy(Array.prototype, 'some');
sinon.spy(Array.prototype, 'sort');
});

afterEach(function() {
afterEach(function () {
Array.prototype.map.reset();
Array.prototype.indexOf.reset();
Array.prototype.forEach.reset();
Expand All @@ -31,7 +33,7 @@
Array.prototype.sort.reset();
});

after(function() {
after(function () {
Array.prototype.map.restore();
Array.prototype.indexOf.restore();
Array.prototype.forEach.restore();
Expand Down
Loading