Skip to content

Commit

Permalink
Updating tests crypto-square (#2582)
Browse files Browse the repository at this point in the history
  • Loading branch information
jagdish-15 authored Jan 6, 2025
1 parent b1e9fba commit 7372624
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
1 change: 1 addition & 0 deletions exercises/practice/crypto-square/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
],
"contributors": [
"diego-caceres",
"jagdish-15",
"ntshcalleia",
"rchavarria",
"ryanplusplus",
Expand Down
16 changes: 13 additions & 3 deletions exercises/practice/crypto-square/.meta/tests.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
# This is an auto-generated file. Regular comments will be removed when this
# file is regenerated. Regenerating will not touch any manually added keys,
# so comments can be added in a "comment" key.
# This is an auto-generated file.
#
# Regenerating this file via `configlet sync` will:
# - Recreate every `description` key/value pair
# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications
# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion)
# - Preserve any other key/value pair
#
# As user-added comments (using the # character) will be removed when this file
# is regenerated, comments can be added via a `comment` key.

[407c3837-9aa7-4111-ab63-ec54b58e8e9f]
description = "empty plaintext results in an empty ciphertext"

[aad04a25-b8bb-4304-888b-581bea8e0040]
description = "normalization results in empty plaintext"

[64131d65-6fd9-4f58-bdd8-4a2370fb481d]
description = "Lowercase"

Expand Down
5 changes: 5 additions & 0 deletions exercises/practice/crypto-square/crypto-square.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ describe('Crypto', () => {
expect(crypto.ciphertext).toEqual('');
});

test('normalization results in empty plaintext', () => {
const crypto = new Crypto('... --- ...');
expect(crypto.ciphertext).toEqual('');
});

xtest('Lowercase', () => {
const crypto = new Crypto('A');
expect(crypto.ciphertext).toEqual('a');
Expand Down

0 comments on commit 7372624

Please sign in to comment.