Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Ciphers/test/KeyFinder.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { keyFinder } from '../KeyFinder.js'

describe('Testing keyFinder function', () => {
it('Test - 1, Testing for invalid types', () => {
expect(() => keyFinder(-1)).toThrow()
})

it('Test - 2, Testing for encrypted input', () => {
// expect(keyFinder("Rfkkjwi, oekh xcdktgizoutz, tge zqyv.")).toBe(20)
expect(keyFinder('L fdph, L vdz, L frqtxhuhg.')).toBe(23)
expect(keyFinder('Lzwespj pfl zljyla pz uvwlxlyepl.')).toBe(19)
expect(keyFinder('Oy zmk zmciaxu kgixz.')).toBe(20)
})

it('Test - 3, Testing for random input', () => {
// expect(keyFinder("Rfkkjwi, oekh xcdktgizoutz, tge zqyv.")).toBe(20)
expect(keyFinder('aaaa')).toBe(0)
expect(keyFinder('bcde')).toBe(0)
})
})
10 changes: 5 additions & 5 deletions Project-Euler/test/Problem044.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ describe('checking nth prime number', () => {
test('if the number is greater or equal to 1', () => {
expect(problem44(1)).toBe(5482660)
})
// Project Euler Second Value for Condition Check
// FIXME skip this test for now because it runs very long and clogs up the CI & pre-commit hook
test('if the number is greater or equal to 2167', () => {
expect(problem44(2167)).toBe(8476206790)
})
// Project Euler Second Value for Condition Check
// FIXME skip this test for now because it runs very long and clogs up the CI & pre-commit hook
// test('if the number is greater or equal to 2167', () => {
// expect(problem44(2167)).toBe(8476206790)
// })
})
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# The Algorithms - JavaScript

[google docs link](https://docs.google.com/document/d/1ATn52wGKfP9WK6UnFX670RMKDjirGzvb-0VRBk1IZOs/edit?usp=sharing)


<!-- Front Matter -->
JavaScript Repository of TheAlgorithms, which implements various algorithms and data structures in JavaScript.

Expand Down
103 changes: 103 additions & 0 deletions report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Report for assignment 3

This is a template for your report. You are free to modify it as needed.
It is not required to use markdown for your report either, but the report
has to be delivered in a standard, cross-platform format.

## Project

Name:

URL:

One or two sentences describing it

## Onboarding experience

Did it build and run as documented?

See the assignment for details; if everything works out of the box,
there is no need to write much here. If the first project(s) you picked
ended up being unsuitable, you can describe the "onboarding experience"
for each project, along with reason(s) why you changed to a different one.


## Complexity

1. What are your results for ten complex functions?
* Did all methods (tools vs. manual count) get the same result?
* Are the results clear?
2. Are the functions just complex, or also long?
3. What is the purpose of the functions?
4. Are exceptions taken into account in the given measurements?
5. Is the documentation clear w.r.t. all the possible outcomes?

## Refactoring

Plan for refactoring complex code:

Estimated impact of refactoring (lower CC, but other drawbacks?).

Carried out refactoring (optional, P+):

git diff ...

## Coverage

### Tools

Document your experience in using a "new"/different coverage tool.

How well was the tool documented? Was it possible/easy/difficult to
integrate it with your build environment?

### Your own coverage tool

Show a patch (or link to a branch) that shows the instrumented code to
gather coverage measurements.

The patch is probably too long to be copied here, so please add
the git command that is used to obtain the patch instead:

git diff ...

What kinds of constructs does your tool support, and how accurate is
its output?

### Evaluation

1. How detailed is your coverage measurement?

2. What are the limitations of your own tool?

3. Are the results of your tool consistent with existing coverage tools?

## Coverage improvement

Show the comments that describe the requirements for the coverage.

Report of old coverage: [link]

Report of new coverage: [link]

Test cases added:

git diff ...

Number of test cases added: two per team member (P) or at least four (P+).

## Self-assessment: Way of working

Current state according to the Essence standard: ...

Was the self-assessment unanimous? Any doubts about certain items?

How have you improved so far?

Where is potential for improvement?

## Overall experience

What are your main take-aways from this project? What did you learn?

Is there something special you want to mention here?