Added jest

Removed generator-exercises folder as it breaks jest-codemods

run jest-codemods on .spec.js files, move generator-exercises back in

Change references from Jasmine to Jest in main readme

Update README with Jest specific language. Update some spec files with new syntax

update tests, multiple exercises

.gitignore: Added package-lock.json, package.json that were used when I ran code-blocks over the tests.

Standardised function declaration calls across exercises

fix typo in caesar.spec.js

Ignoring package-lock.json, package.json

Backtrack on .gitignore modification, add instructions to readme

move files from testing repo to this repo

Typo fixes, remove duplicate exercise folder

Remove solution from non-solution branch

Minor grammatical fixes

added trailing semicolon to all function and module exports

Fix words caught by search/replace action.

remove doubled semicolon.

Correct words caught by search/replace action.

Add missing semicolon.

Add .DS_Store to .gitignore

multiple files: Added a blank line at the end of each file

Ignore generator-exercise when linting exercise files

Update exercise number of each exercise

Update exercise number
This commit is contained in:
Michael Frank
2021-03-03 15:13:24 +13:00
committed by Kevin Mulhern
parent 4c771f2e05
commit 5708c3d85a
53 changed files with 6259 additions and 322 deletions
+8 -8
View File
@@ -1,22 +1,22 @@
const repeatString = require('./repeatString')
describe('repeatString', function() {
it('repeats the string', function() {
describe('repeatString', () => {
test('repeats the string', () => {
expect(repeatString('hey', 3)).toEqual('heyheyhey');
});
xit('repeats the string many times', function() {
test.skip('repeats the string many times', () => {
expect(repeatString('hey', 10)).toEqual('heyheyheyheyheyheyheyheyheyhey');
});
xit('repeats the string 1 times', function() {
test.skip('repeats the string 1 times', () => {
expect(repeatString('hey', 1)).toEqual('hey');
});
xit('repeats the string 0 times', function() {
test.skip('repeats the string 0 times', () => {
expect(repeatString('hey', 0)).toEqual('');
});
xit('returns ERROR with negative numbers', function() {
test.skip('returns ERROR with negative numbers', () => {
expect(repeatString('hey', -1)).toEqual('ERROR');
});
xit('repeats the string a random amount of times', function () {
test.skip('repeats the string a random amount of times', function () {
/*The number is generated by using Math.random to get a value from between
0 to 1, when this is multiplied by 1000 and rounded down with Math.floor it
equals a number between 0 to 999 (this number will change everytime you run
@@ -31,7 +31,7 @@ describe('repeatString', function() {
was randomaly generated. */
expect(repeatString('hey', number).match(/((hey))/g).length).toEqual(number);
});
xit('works with blank strings', function() {
test.skip('works with blank strings', () => {
expect(repeatString('', 10)).toEqual('');
});
});