From 2fdf762c9885eefa64cdf4cdea56f1c67c9d4cee Mon Sep 17 00:00:00 2001 From: Luiz Date: Fri, 22 Mar 2024 09:47:46 -0300 Subject: [PATCH] remover o jest.test.js --- .../js/code/fibonacci-sequence.jest.test.js | 23 -- ...ode.test.js => fibonacci-sequence.test.js} | 0 .../response/fibonacci-sequence.jest.test.js | 23 -- ...ode.test.js => fibonacci-sequence.test.js} | 0 .../js/code/identity-matrix.jest.test.js | 22 -- .../js/reponse/identity-matrix.jest.test.js | 22 -- ...x.node.test.js => identity-matrix.test.js} | 0 .../js/code/matrix-operations.jest.test.js | 27 -- ...node.test.js => matrix-operations.test.js} | 0 .../response/matrix-operations.jest.test.js | 27 -- ...node.test.js => matrix-operations.test.js} | 0 .../_codes/js/code/min-withdraw.jest.test.js | 15 -- ...draw.node.test.js => min-withdraw.test.js} | 0 .../js/response/min-withdraw.jest.test.js | 15 -- ...draw.node.test.js => min-withdraw.test.js} | 0 .../js/code/array-operations.jest.test.js | 33 --- ....node.test.js => array-operations.test.js} | 0 .../js/response/array-operations.jest.test.js | 33 --- ....node.test.js => array-operations.test.js} | 0 .../_codes/js/code/prime-factors.jest.test.js | 47 ---- ...ors.node.test.js => prime-factors.test.js} | 0 .../js/response/prime-factors.jest.test.js | 47 ---- ...ors.node.test.js => prime-factors.test.js} | 0 .../_codes/js/code/prime-numbers.jest.test.js | 23 -- ...ers.node.test.js => prime-numbers.test.js} | 0 .../js/response/prime-numbers.jest.test.js | 23 -- ...ers.node.test.js => prime-numbers.test.js} | 0 .../_codes/js/code/products-qtd.jest.test.js | 31 --- ...-qtd.node.test.js => products-qtd.test.js} | 0 .../js/response/products-qtd.jest.test.js | 31 --- ...-qtd.node.test.js => products-qtd.test.js} | 0 .../_codes/js/code/products.jest.test.js | 12 - ...products.node.test.js => products.test.js} | 0 .../_codes/js/response/products.jest.test.js | 12 - ...products.node.test.js => products.test.js} | 0 .../_codes/js/code/roman-number.jest.test.js | 75 ------ ...mber.node.test.js => roman-number.test.js} | 0 .../js/response/roman-number.jest.test.js | 75 ------ ...mber.node.test.js => roman-number.test.js} | 0 .../sum-all-numbers-in-array.jest.test.js | 28 -- ...st.js => sum-all-numbers-in-array.test.js} | 0 .../sum-all-numbers-in-array.jest.test.js | 28 -- ...st.js => sum-all-numbers-in-array.test.js} | 0 .../_codes/js/code/array-util.jest.test.js | 55 ---- ...y-util.node.test.js => array-util.test.js} | 0 .../js/response/array-util.jest.test.js | 55 ---- ...y-util.node.test.js => array-util.test.js} | 0 .../js/code/area-of-circle.jest.test.js | 11 - ...le.node.test.js => area-of-circle.test.js} | 0 .../js/response/area-of-circle.jest.test.js | 11 - ...le.node.test.js => area-of-circle.test.js} | 0 .../_codes/js/code/calc.jest.test.js | 19 -- .../code/{calc.node.test.js => calc.test.js} | 0 .../_codes/js/response/calc.jest.test.js | 19 -- .../{calc.node.test.js => calc.test.js} | 0 .../_codes/js/code/calendar.jest.test.js | 59 ---- ...calendar.node.test.js => calendar.test.js} | 0 .../_codes/js/response/calendar.jest.test.js | 59 ---- ...calendar.node.test.js => calendar.test.js} | 0 .../_codes/js/code/factorial.jest.test.js | 19 -- ...ctorial.node.test.js => factorial.test.js} | 0 .../_codes/js/response/factorial.jest.test.js | 19 -- ...ctorial.node.test.js => factorial.test.js} | 0 .../js/code/fibonacci-number.jest.test.js | 23 -- ....node.test.js => fibonacci-number.test.js} | 0 .../js/response/fibonacci-number.jest.test.js | 23 -- ....node.test.js => fibonacci-number.test.js} | 0 .../js/code/fibonacci-sequence.jest.test.js | 23 -- ...ode.test.js => fibonacci-sequence.test.js} | 0 .../response/fibonacci-sequence.jest.test.js | 23 -- ...ode.test.js => fibonacci-sequence.test.js} | 0 .../_codes/js/code/figure-text.jest.test.js | 55 ---- ...-text.node.test.js => figure-text.test.js} | 0 .../js/response/figure-text.jest.test.js | 55 ---- ...-text.node.test.js => figure-text.test.js} | 0 .../_codes/js/code/prime-nth.jest.test.js | 11 - ...ime-nth.node.test.js => prime-nth.test.js} | 0 .../_codes/js/response/prime-nth.jest.test.js | 11 - ...ime-nth.node.test.js => prime-nth.test.js} | 0 .../_codes/js/code/prime.jest.test.js | 27 -- .../{prime.node.test.js => prime.test.js} | 0 .../_codes/js/response/prime.jest.test.js | 27 -- .../{prime.node.test.js => prime.test.js} | 0 .../_codes/js/code/sum.jest.test.js | 11 - .../js/code/{sum.node.test.js => sum.test.js} | 0 .../_codes/js/response/sum.jest.test.js | 11 - .../{sum.node.test.js => sum.test.js} | 0 .../js/code/triangle-checker.jest.test.js | 28 -- ....node.test.js => triangle-checker.test.js} | 0 .../js/response/triangle-checker.jest.test.js | 28 -- ....node.test.js => triangle-checker.test.js} | 0 .../code/brazilian-championship.jest.test.js | 34 --- ...test.js => brazilian-championship.test.js} | 0 .../brazilian-championship.jest.test.js | 255 ------------------ ...test.js => brazilian-championship.test.js} | 0 .../_codes/js/code/cep.jest.test.js | 30 --- .../js/code/{cep.node.test.js => cep.test.js} | 0 .../_codes/js/response/cep.jest.test.js | 30 --- .../{cep.node.test.js => cep.test.js} | 0 .../_codes/js/code/comics.jest.test.js | 67 ----- .../{comics.node.test.js => comics.test.js} | 0 .../_codes/js/response/comics.jest.test.js | 67 ----- .../{comics.node.test.js => comics.test.js} | 0 .../_codes/js/code/exam.jest.test.js | 40 --- .../code/{exam.node.test.js => exam.test.js} | 0 .../_codes/js/response/exam.jest.test.js | 45 ---- .../{exam.node.test.js => exam.test.js} | 0 .../_codes/js/code/cipher.jest.test.js | 13 - .../{cipher.node.test.js => cipher.test.js} | 0 .../_codes/js/response/cipher.jest.test.js | 13 - .../{cipher.node.test.js => cipher.test.js} | 0 .../_codes/js/code/citation.jest.test.js | 13 - ...citation.node.test.js => citation.test.js} | 0 .../_codes/js/response/citation.jest.test.js | 13 - ...citation.node.test.js => citation.test.js} | 0 .../js/code/generating-cpf.jest.test.js | 15 -- ...pf.node.test.js => generating-cpf.test.js} | 0 .../js/response/generating-cpf.jest.test.js | 15 -- ...pf.node.test.js => generating-cpf.test.js} | 0 .../_codes/js/code/hamming.jest.test.js | 15 -- .../{hamming.node.test.js => hamming.test.js} | 0 .../_codes/js/response/hamming.jest.test.js | 15 -- .../{hamming.node.test.js => hamming.test.js} | 0 .../_codes/js/code/ip.jest.test.js | 19 -- .../js/code/{ip.node.test.js => ip.test.js} | 0 .../_codes/js/response/ip.jest.test.js | 19 -- .../response/{ip.node.test.js => ip.test.js} | 0 .../js/code/list-generator.jest.test.js | 25 -- ...or.node.test.js => list-generator.test.js} | 0 .../js/response/list-generator.jest.test.js | 25 -- ...or.node.test.js => list-generator.test.js} | 0 .../code/lorem-ipsum-generator.jest.test.js | 27 -- ....test.js => lorem-ipsum-generator.test.js} | 0 .../lorem-ipsum-generator.jest.test.js | 27 -- ....test.js => lorem-ipsum-generator.test.js} | 0 .../code/table-convert-md2html.jest.test.js | 26 -- ....test.js => table-convert-md2html.test.js} | 0 .../table-convert-md2html.jest.test.js | 26 -- ....test.js => table-convert-md2html.test.js} | 0 .../js/code/rna-transcription.jest.test.js | 23 -- ...node.test.js => rna-transcription.test.js} | 0 .../response/rna-transcription.jest.test.js | 23 -- ...node.test.js => rna-transcription.test.js} | 0 .../js/code/simple-substitution.jest.test.js | 19 -- ...de.test.js => simple-substitution.test.js} | 0 .../response/simple-substitution.jest.test.js | 17 -- ...de.test.js => simple-substitution.test.js} | 0 .../js/code/table-generator.jest.test.js | 47 ---- ...r.node.test.js => table-generator.test.js} | 0 .../js/response/table-generator.jest.test.js | 47 ---- ...r.node.test.js => table-generator.test.js} | 0 .../_codes/js/code/parser.jest.test.js | 51 ---- .../{parser.node.test.js => parser.test.js} | 0 .../_codes/js/response/parser.jest.test.js | 51 ---- .../{parser.node.test.js => parser.test.js} | 0 .../_codes/js/code/string-util.jest.test.js | 35 --- ...-util.node.test.js => string-util.test.js} | 0 .../js/response/string-util.jest.test.js | 35 --- ...-util.node.test.js => string-util.test.js} | 0 .../js/code/validating-cpf.jest.test.js | 7 - ...pf.node.test.js => validating-cpf.test.js} | 0 .../js/response/validating-cpf.jest.test.js | 7 - ...pf.node.test.js => validating-cpf.test.js} | 0 src/pages/exercises/test.sh | 4 +- 164 files changed, 2 insertions(+), 2592 deletions(-) delete mode 100644 src/pages/exercises/array-fibonacci-sequence/_codes/js/code/fibonacci-sequence.jest.test.js rename src/pages/exercises/array-fibonacci-sequence/_codes/js/code/{fibonacci-sequence.node.test.js => fibonacci-sequence.test.js} (100%) delete mode 100644 src/pages/exercises/array-fibonacci-sequence/_codes/js/response/fibonacci-sequence.jest.test.js rename src/pages/exercises/array-fibonacci-sequence/_codes/js/response/{fibonacci-sequence.node.test.js => fibonacci-sequence.test.js} (100%) delete mode 100644 src/pages/exercises/array-identity-matrix/_codes/js/code/identity-matrix.jest.test.js delete mode 100644 src/pages/exercises/array-identity-matrix/_codes/js/reponse/identity-matrix.jest.test.js rename src/pages/exercises/array-identity-matrix/_codes/js/reponse/{identity-matrix.node.test.js => identity-matrix.test.js} (100%) delete mode 100644 src/pages/exercises/array-matrix-operations/_codes/js/code/matrix-operations.jest.test.js rename src/pages/exercises/array-matrix-operations/_codes/js/code/{matrix-operations.node.test.js => matrix-operations.test.js} (100%) delete mode 100644 src/pages/exercises/array-matrix-operations/_codes/js/response/matrix-operations.jest.test.js rename src/pages/exercises/array-matrix-operations/_codes/js/response/{matrix-operations.node.test.js => matrix-operations.test.js} (100%) delete mode 100644 src/pages/exercises/array-min-withdraw/_codes/js/code/min-withdraw.jest.test.js rename src/pages/exercises/array-min-withdraw/_codes/js/code/{min-withdraw.node.test.js => min-withdraw.test.js} (100%) delete mode 100644 src/pages/exercises/array-min-withdraw/_codes/js/response/min-withdraw.jest.test.js rename src/pages/exercises/array-min-withdraw/_codes/js/response/{min-withdraw.node.test.js => min-withdraw.test.js} (100%) delete mode 100644 src/pages/exercises/array-operations/_codes/js/code/array-operations.jest.test.js rename src/pages/exercises/array-operations/_codes/js/code/{array-operations.node.test.js => array-operations.test.js} (100%) delete mode 100644 src/pages/exercises/array-operations/_codes/js/response/array-operations.jest.test.js rename src/pages/exercises/array-operations/_codes/js/response/{array-operations.node.test.js => array-operations.test.js} (100%) delete mode 100644 src/pages/exercises/array-prime-factors/_codes/js/code/prime-factors.jest.test.js rename src/pages/exercises/array-prime-factors/_codes/js/code/{prime-factors.node.test.js => prime-factors.test.js} (100%) delete mode 100644 src/pages/exercises/array-prime-factors/_codes/js/response/prime-factors.jest.test.js rename src/pages/exercises/array-prime-factors/_codes/js/response/{prime-factors.node.test.js => prime-factors.test.js} (100%) delete mode 100644 src/pages/exercises/array-prime-numbers/_codes/js/code/prime-numbers.jest.test.js rename src/pages/exercises/array-prime-numbers/_codes/js/code/{prime-numbers.node.test.js => prime-numbers.test.js} (100%) delete mode 100644 src/pages/exercises/array-prime-numbers/_codes/js/response/prime-numbers.jest.test.js rename src/pages/exercises/array-prime-numbers/_codes/js/response/{prime-numbers.node.test.js => prime-numbers.test.js} (100%) delete mode 100644 src/pages/exercises/array-products-qtd/_codes/js/code/products-qtd.jest.test.js rename src/pages/exercises/array-products-qtd/_codes/js/code/{products-qtd.node.test.js => products-qtd.test.js} (100%) delete mode 100644 src/pages/exercises/array-products-qtd/_codes/js/response/products-qtd.jest.test.js rename src/pages/exercises/array-products-qtd/_codes/js/response/{products-qtd.node.test.js => products-qtd.test.js} (100%) delete mode 100644 src/pages/exercises/array-products/_codes/js/code/products.jest.test.js rename src/pages/exercises/array-products/_codes/js/code/{products.node.test.js => products.test.js} (100%) delete mode 100644 src/pages/exercises/array-products/_codes/js/response/products.jest.test.js rename src/pages/exercises/array-products/_codes/js/response/{products.node.test.js => products.test.js} (100%) delete mode 100644 src/pages/exercises/array-roman-number/_codes/js/code/roman-number.jest.test.js rename src/pages/exercises/array-roman-number/_codes/js/code/{roman-number.node.test.js => roman-number.test.js} (100%) delete mode 100644 src/pages/exercises/array-roman-number/_codes/js/response/roman-number.jest.test.js rename src/pages/exercises/array-roman-number/_codes/js/response/{roman-number.node.test.js => roman-number.test.js} (100%) delete mode 100644 src/pages/exercises/array-sum-all-numbers/_codes/js/code/sum-all-numbers-in-array.jest.test.js rename src/pages/exercises/array-sum-all-numbers/_codes/js/code/{sum-all-numbers-in-array.node.test.js => sum-all-numbers-in-array.test.js} (100%) delete mode 100644 src/pages/exercises/array-sum-all-numbers/_codes/js/response/sum-all-numbers-in-array.jest.test.js rename src/pages/exercises/array-sum-all-numbers/_codes/js/response/{sum-all-numbers-in-array.node.test.js => sum-all-numbers-in-array.test.js} (100%) delete mode 100644 src/pages/exercises/array-util/_codes/js/code/array-util.jest.test.js rename src/pages/exercises/array-util/_codes/js/code/{array-util.node.test.js => array-util.test.js} (100%) delete mode 100644 src/pages/exercises/array-util/_codes/js/response/array-util.jest.test.js rename src/pages/exercises/array-util/_codes/js/response/{array-util.node.test.js => array-util.test.js} (100%) delete mode 100644 src/pages/exercises/function-area-of-circle/_codes/js/code/area-of-circle.jest.test.js rename src/pages/exercises/function-area-of-circle/_codes/js/code/{area-of-circle.node.test.js => area-of-circle.test.js} (100%) delete mode 100644 src/pages/exercises/function-area-of-circle/_codes/js/response/area-of-circle.jest.test.js rename src/pages/exercises/function-area-of-circle/_codes/js/response/{area-of-circle.node.test.js => area-of-circle.test.js} (100%) delete mode 100644 src/pages/exercises/function-calc/_codes/js/code/calc.jest.test.js rename src/pages/exercises/function-calc/_codes/js/code/{calc.node.test.js => calc.test.js} (100%) delete mode 100644 src/pages/exercises/function-calc/_codes/js/response/calc.jest.test.js rename src/pages/exercises/function-calc/_codes/js/response/{calc.node.test.js => calc.test.js} (100%) delete mode 100644 src/pages/exercises/function-calendar/_codes/js/code/calendar.jest.test.js rename src/pages/exercises/function-calendar/_codes/js/code/{calendar.node.test.js => calendar.test.js} (100%) delete mode 100644 src/pages/exercises/function-calendar/_codes/js/response/calendar.jest.test.js rename src/pages/exercises/function-calendar/_codes/js/response/{calendar.node.test.js => calendar.test.js} (100%) delete mode 100644 src/pages/exercises/function-factorial/_codes/js/code/factorial.jest.test.js rename src/pages/exercises/function-factorial/_codes/js/code/{factorial.node.test.js => factorial.test.js} (100%) delete mode 100644 src/pages/exercises/function-factorial/_codes/js/response/factorial.jest.test.js rename src/pages/exercises/function-factorial/_codes/js/response/{factorial.node.test.js => factorial.test.js} (100%) delete mode 100644 src/pages/exercises/function-fibonacci-nth/_codes/js/code/fibonacci-number.jest.test.js rename src/pages/exercises/function-fibonacci-nth/_codes/js/code/{fibonacci-number.node.test.js => fibonacci-number.test.js} (100%) delete mode 100644 src/pages/exercises/function-fibonacci-nth/_codes/js/response/fibonacci-number.jest.test.js rename src/pages/exercises/function-fibonacci-nth/_codes/js/response/{fibonacci-number.node.test.js => fibonacci-number.test.js} (100%) delete mode 100644 src/pages/exercises/function-fibonacci-sequence/_codes/js/code/fibonacci-sequence.jest.test.js rename src/pages/exercises/function-fibonacci-sequence/_codes/js/code/{fibonacci-sequence.node.test.js => fibonacci-sequence.test.js} (100%) delete mode 100644 src/pages/exercises/function-fibonacci-sequence/_codes/js/response/fibonacci-sequence.jest.test.js rename src/pages/exercises/function-fibonacci-sequence/_codes/js/response/{fibonacci-sequence.node.test.js => fibonacci-sequence.test.js} (100%) delete mode 100644 src/pages/exercises/function-figure-text/_codes/js/code/figure-text.jest.test.js rename src/pages/exercises/function-figure-text/_codes/js/code/{figure-text.node.test.js => figure-text.test.js} (100%) delete mode 100644 src/pages/exercises/function-figure-text/_codes/js/response/figure-text.jest.test.js rename src/pages/exercises/function-figure-text/_codes/js/response/{figure-text.node.test.js => figure-text.test.js} (100%) delete mode 100644 src/pages/exercises/function-prime-nth/_codes/js/code/prime-nth.jest.test.js rename src/pages/exercises/function-prime-nth/_codes/js/code/{prime-nth.node.test.js => prime-nth.test.js} (100%) delete mode 100644 src/pages/exercises/function-prime-nth/_codes/js/response/prime-nth.jest.test.js rename src/pages/exercises/function-prime-nth/_codes/js/response/{prime-nth.node.test.js => prime-nth.test.js} (100%) delete mode 100644 src/pages/exercises/function-prime/_codes/js/code/prime.jest.test.js rename src/pages/exercises/function-prime/_codes/js/code/{prime.node.test.js => prime.test.js} (100%) delete mode 100644 src/pages/exercises/function-prime/_codes/js/response/prime.jest.test.js rename src/pages/exercises/function-prime/_codes/js/response/{prime.node.test.js => prime.test.js} (100%) delete mode 100644 src/pages/exercises/function-sum/_codes/js/code/sum.jest.test.js rename src/pages/exercises/function-sum/_codes/js/code/{sum.node.test.js => sum.test.js} (100%) delete mode 100644 src/pages/exercises/function-sum/_codes/js/response/sum.jest.test.js rename src/pages/exercises/function-sum/_codes/js/response/{sum.node.test.js => sum.test.js} (100%) delete mode 100644 src/pages/exercises/function-triangle-checker/_codes/js/code/triangle-checker.jest.test.js rename src/pages/exercises/function-triangle-checker/_codes/js/code/{triangle-checker.node.test.js => triangle-checker.test.js} (100%) delete mode 100644 src/pages/exercises/function-triangle-checker/_codes/js/response/triangle-checker.jest.test.js rename src/pages/exercises/function-triangle-checker/_codes/js/response/{triangle-checker.node.test.js => triangle-checker.test.js} (100%) delete mode 100644 src/pages/exercises/object-brazilian-championship/_codes/js/code/brazilian-championship.jest.test.js rename src/pages/exercises/object-brazilian-championship/_codes/js/code/{brazilian-championship.node.test.js => brazilian-championship.test.js} (100%) delete mode 100644 src/pages/exercises/object-brazilian-championship/_codes/js/response/brazilian-championship.jest.test.js rename src/pages/exercises/object-brazilian-championship/_codes/js/response/{brazilian-championship.node.test.js => brazilian-championship.test.js} (100%) delete mode 100644 src/pages/exercises/object-cep/_codes/js/code/cep.jest.test.js rename src/pages/exercises/object-cep/_codes/js/code/{cep.node.test.js => cep.test.js} (100%) delete mode 100644 src/pages/exercises/object-cep/_codes/js/response/cep.jest.test.js rename src/pages/exercises/object-cep/_codes/js/response/{cep.node.test.js => cep.test.js} (100%) delete mode 100644 src/pages/exercises/object-comics/_codes/js/code/comics.jest.test.js rename src/pages/exercises/object-comics/_codes/js/code/{comics.node.test.js => comics.test.js} (100%) delete mode 100644 src/pages/exercises/object-comics/_codes/js/response/comics.jest.test.js rename src/pages/exercises/object-comics/_codes/js/response/{comics.node.test.js => comics.test.js} (100%) delete mode 100644 src/pages/exercises/object-exam/_codes/js/code/exam.jest.test.js rename src/pages/exercises/object-exam/_codes/js/code/{exam.node.test.js => exam.test.js} (100%) delete mode 100644 src/pages/exercises/object-exam/_codes/js/response/exam.jest.test.js rename src/pages/exercises/object-exam/_codes/js/response/{exam.node.test.js => exam.test.js} (100%) delete mode 100644 src/pages/exercises/string-cipher/_codes/js/code/cipher.jest.test.js rename src/pages/exercises/string-cipher/_codes/js/code/{cipher.node.test.js => cipher.test.js} (100%) delete mode 100644 src/pages/exercises/string-cipher/_codes/js/response/cipher.jest.test.js rename src/pages/exercises/string-cipher/_codes/js/response/{cipher.node.test.js => cipher.test.js} (100%) delete mode 100644 src/pages/exercises/string-citation/_codes/js/code/citation.jest.test.js rename src/pages/exercises/string-citation/_codes/js/code/{citation.node.test.js => citation.test.js} (100%) delete mode 100644 src/pages/exercises/string-citation/_codes/js/response/citation.jest.test.js rename src/pages/exercises/string-citation/_codes/js/response/{citation.node.test.js => citation.test.js} (100%) delete mode 100644 src/pages/exercises/string-generating-cpf/_codes/js/code/generating-cpf.jest.test.js rename src/pages/exercises/string-generating-cpf/_codes/js/code/{generating-cpf.node.test.js => generating-cpf.test.js} (100%) delete mode 100644 src/pages/exercises/string-generating-cpf/_codes/js/response/generating-cpf.jest.test.js rename src/pages/exercises/string-generating-cpf/_codes/js/response/{generating-cpf.node.test.js => generating-cpf.test.js} (100%) delete mode 100644 src/pages/exercises/string-hamming/_codes/js/code/hamming.jest.test.js rename src/pages/exercises/string-hamming/_codes/js/code/{hamming.node.test.js => hamming.test.js} (100%) delete mode 100644 src/pages/exercises/string-hamming/_codes/js/response/hamming.jest.test.js rename src/pages/exercises/string-hamming/_codes/js/response/{hamming.node.test.js => hamming.test.js} (100%) delete mode 100644 src/pages/exercises/string-ip-to-number/_codes/js/code/ip.jest.test.js rename src/pages/exercises/string-ip-to-number/_codes/js/code/{ip.node.test.js => ip.test.js} (100%) delete mode 100644 src/pages/exercises/string-ip-to-number/_codes/js/response/ip.jest.test.js rename src/pages/exercises/string-ip-to-number/_codes/js/response/{ip.node.test.js => ip.test.js} (100%) delete mode 100644 src/pages/exercises/string-list-generator/_codes/js/code/list-generator.jest.test.js rename src/pages/exercises/string-list-generator/_codes/js/code/{list-generator.node.test.js => list-generator.test.js} (100%) delete mode 100644 src/pages/exercises/string-list-generator/_codes/js/response/list-generator.jest.test.js rename src/pages/exercises/string-list-generator/_codes/js/response/{list-generator.node.test.js => list-generator.test.js} (100%) delete mode 100644 src/pages/exercises/string-lorem-ipsum-generator/_codes/js/code/lorem-ipsum-generator.jest.test.js rename src/pages/exercises/string-lorem-ipsum-generator/_codes/js/code/{lorem-ipsum-generator.node.test.js => lorem-ipsum-generator.test.js} (100%) delete mode 100644 src/pages/exercises/string-lorem-ipsum-generator/_codes/js/response/lorem-ipsum-generator.jest.test.js rename src/pages/exercises/string-lorem-ipsum-generator/_codes/js/response/{lorem-ipsum-generator.node.test.js => lorem-ipsum-generator.test.js} (100%) delete mode 100644 src/pages/exercises/string-parse-table-md2html/_codes/js/code/table-convert-md2html.jest.test.js rename src/pages/exercises/string-parse-table-md2html/_codes/js/code/{table-convert-md2html.node.test.js => table-convert-md2html.test.js} (100%) delete mode 100644 src/pages/exercises/string-parse-table-md2html/_codes/js/response/table-convert-md2html.jest.test.js rename src/pages/exercises/string-parse-table-md2html/_codes/js/response/{table-convert-md2html.node.test.js => table-convert-md2html.test.js} (100%) delete mode 100644 src/pages/exercises/string-rna-transcription/_codes/js/code/rna-transcription.jest.test.js rename src/pages/exercises/string-rna-transcription/_codes/js/code/{rna-transcription.node.test.js => rna-transcription.test.js} (100%) delete mode 100644 src/pages/exercises/string-rna-transcription/_codes/js/response/rna-transcription.jest.test.js rename src/pages/exercises/string-rna-transcription/_codes/js/response/{rna-transcription.node.test.js => rna-transcription.test.js} (100%) delete mode 100644 src/pages/exercises/string-simple-substitution/_codes/js/code/simple-substitution.jest.test.js rename src/pages/exercises/string-simple-substitution/_codes/js/code/{simple-substitution.node.test.js => simple-substitution.test.js} (100%) delete mode 100644 src/pages/exercises/string-simple-substitution/_codes/js/response/simple-substitution.jest.test.js rename src/pages/exercises/string-simple-substitution/_codes/js/response/{simple-substitution.node.test.js => simple-substitution.test.js} (100%) delete mode 100644 src/pages/exercises/string-table-generator/_codes/js/code/table-generator.jest.test.js rename src/pages/exercises/string-table-generator/_codes/js/code/{table-generator.node.test.js => table-generator.test.js} (100%) delete mode 100644 src/pages/exercises/string-table-generator/_codes/js/response/table-generator.jest.test.js rename src/pages/exercises/string-table-generator/_codes/js/response/{table-generator.node.test.js => table-generator.test.js} (100%) delete mode 100644 src/pages/exercises/string-to-number/_codes/js/code/parser.jest.test.js rename src/pages/exercises/string-to-number/_codes/js/code/{parser.node.test.js => parser.test.js} (100%) delete mode 100644 src/pages/exercises/string-to-number/_codes/js/response/parser.jest.test.js rename src/pages/exercises/string-to-number/_codes/js/response/{parser.node.test.js => parser.test.js} (100%) delete mode 100644 src/pages/exercises/string-util/_codes/js/code/string-util.jest.test.js rename src/pages/exercises/string-util/_codes/js/code/{string-util.node.test.js => string-util.test.js} (100%) delete mode 100644 src/pages/exercises/string-util/_codes/js/response/string-util.jest.test.js rename src/pages/exercises/string-util/_codes/js/response/{string-util.node.test.js => string-util.test.js} (100%) delete mode 100644 src/pages/exercises/string-validating-cpf/_codes/js/code/validating-cpf.jest.test.js rename src/pages/exercises/string-validating-cpf/_codes/js/code/{validating-cpf.node.test.js => validating-cpf.test.js} (100%) delete mode 100644 src/pages/exercises/string-validating-cpf/_codes/js/response/validating-cpf.jest.test.js rename src/pages/exercises/string-validating-cpf/_codes/js/response/{validating-cpf.node.test.js => validating-cpf.test.js} (100%) diff --git a/src/pages/exercises/array-fibonacci-sequence/_codes/js/code/fibonacci-sequence.jest.test.js b/src/pages/exercises/array-fibonacci-sequence/_codes/js/code/fibonacci-sequence.jest.test.js deleted file mode 100644 index dfa0569f..00000000 --- a/src/pages/exercises/array-fibonacci-sequence/_codes/js/code/fibonacci-sequence.jest.test.js +++ /dev/null @@ -1,23 +0,0 @@ -import { fibonacci } from './fibonacci-sequence.js'; - -describe('Fibonacci series', () => { - test('making the first 0 numbers', () => { - expect(fibonacci(0)).toEqual([]); - }); - - test.skip('making the first 1 numbers', () => { - expect(fibonacci(1)).toEqual([0]); - }); - - test.skip('making the first 2 numbers', () => { - expect(fibonacci(2)).toEqual([0, 1]); - }); - - test.skip('making the first 4 numbers', () => { - expect(fibonacci(4)).toEqual([0, 1, 1, 2]); - }); - - test.skip('making the first 6 numbers', () => { - expect(fibonacci(6)).toEqual([0, 1, 1, 2, 3, 5]); - }); -}); diff --git a/src/pages/exercises/array-fibonacci-sequence/_codes/js/code/fibonacci-sequence.node.test.js b/src/pages/exercises/array-fibonacci-sequence/_codes/js/code/fibonacci-sequence.test.js similarity index 100% rename from src/pages/exercises/array-fibonacci-sequence/_codes/js/code/fibonacci-sequence.node.test.js rename to src/pages/exercises/array-fibonacci-sequence/_codes/js/code/fibonacci-sequence.test.js diff --git a/src/pages/exercises/array-fibonacci-sequence/_codes/js/response/fibonacci-sequence.jest.test.js b/src/pages/exercises/array-fibonacci-sequence/_codes/js/response/fibonacci-sequence.jest.test.js deleted file mode 100644 index dfa0569f..00000000 --- a/src/pages/exercises/array-fibonacci-sequence/_codes/js/response/fibonacci-sequence.jest.test.js +++ /dev/null @@ -1,23 +0,0 @@ -import { fibonacci } from './fibonacci-sequence.js'; - -describe('Fibonacci series', () => { - test('making the first 0 numbers', () => { - expect(fibonacci(0)).toEqual([]); - }); - - test.skip('making the first 1 numbers', () => { - expect(fibonacci(1)).toEqual([0]); - }); - - test.skip('making the first 2 numbers', () => { - expect(fibonacci(2)).toEqual([0, 1]); - }); - - test.skip('making the first 4 numbers', () => { - expect(fibonacci(4)).toEqual([0, 1, 1, 2]); - }); - - test.skip('making the first 6 numbers', () => { - expect(fibonacci(6)).toEqual([0, 1, 1, 2, 3, 5]); - }); -}); diff --git a/src/pages/exercises/array-fibonacci-sequence/_codes/js/response/fibonacci-sequence.node.test.js b/src/pages/exercises/array-fibonacci-sequence/_codes/js/response/fibonacci-sequence.test.js similarity index 100% rename from src/pages/exercises/array-fibonacci-sequence/_codes/js/response/fibonacci-sequence.node.test.js rename to src/pages/exercises/array-fibonacci-sequence/_codes/js/response/fibonacci-sequence.test.js diff --git a/src/pages/exercises/array-identity-matrix/_codes/js/code/identity-matrix.jest.test.js b/src/pages/exercises/array-identity-matrix/_codes/js/code/identity-matrix.jest.test.js deleted file mode 100644 index 53494405..00000000 --- a/src/pages/exercises/array-identity-matrix/_codes/js/code/identity-matrix.jest.test.js +++ /dev/null @@ -1,22 +0,0 @@ -import { identityMatrix } from './identity-matrix.js'; - -describe('Identity Matrix', () => { - test('it should return identity matrix of order 1', () => { - expect(identityMatrix(1)).toEqual([[1]]); - }); - - test('it should return identity matrix of order 2', () => { - expect(identityMatrix(2)).toEqual([ - [1, 0], - [0, 1], - ]); - }); - - test('it should return identity matrix of order 3', () => { - expect(identityMatrix(3)).toEqual([ - [1, 0, 0], - [0, 1, 0], - [0, 0, 1], - ]); - }); -}); diff --git a/src/pages/exercises/array-identity-matrix/_codes/js/reponse/identity-matrix.jest.test.js b/src/pages/exercises/array-identity-matrix/_codes/js/reponse/identity-matrix.jest.test.js deleted file mode 100644 index 53494405..00000000 --- a/src/pages/exercises/array-identity-matrix/_codes/js/reponse/identity-matrix.jest.test.js +++ /dev/null @@ -1,22 +0,0 @@ -import { identityMatrix } from './identity-matrix.js'; - -describe('Identity Matrix', () => { - test('it should return identity matrix of order 1', () => { - expect(identityMatrix(1)).toEqual([[1]]); - }); - - test('it should return identity matrix of order 2', () => { - expect(identityMatrix(2)).toEqual([ - [1, 0], - [0, 1], - ]); - }); - - test('it should return identity matrix of order 3', () => { - expect(identityMatrix(3)).toEqual([ - [1, 0, 0], - [0, 1, 0], - [0, 0, 1], - ]); - }); -}); diff --git a/src/pages/exercises/array-identity-matrix/_codes/js/reponse/identity-matrix.node.test.js b/src/pages/exercises/array-identity-matrix/_codes/js/reponse/identity-matrix.test.js similarity index 100% rename from src/pages/exercises/array-identity-matrix/_codes/js/reponse/identity-matrix.node.test.js rename to src/pages/exercises/array-identity-matrix/_codes/js/reponse/identity-matrix.test.js diff --git a/src/pages/exercises/array-matrix-operations/_codes/js/code/matrix-operations.jest.test.js b/src/pages/exercises/array-matrix-operations/_codes/js/code/matrix-operations.jest.test.js deleted file mode 100644 index c2a924bf..00000000 --- a/src/pages/exercises/array-matrix-operations/_codes/js/code/matrix-operations.jest.test.js +++ /dev/null @@ -1,27 +0,0 @@ -import { addingMatrix, multiplyingMatrix } from './matrix-operations.js'; - -describe('Matrix Operation', () => { - test('adding a matrix (2x2) by another matrix (2x2)', () => { - let a = [[3, 8], [4, 6]]; - let b = [[4, 0], [1, -9]]; - expect(addingMatrix(a, b)).toEqual([[7, 8], [5, -3]]); - }); - - test('adding a matrix (3x3) by another matrix (3x3)', () => { - let a = [[3, 8, 3], [4, 6, -1], [3, 8, 3]]; - let b = [[4, 0, 5], [1, -9, 0], [3, 8, 3]]; - expect(addingMatrix(a, b)).toEqual([[7, 8, 8], [5, -3, -1], [6, 16, 6]]); - }); - - test('multiplying a matrix (2x3) by another matrix (3x2)', () => { - let a = [[1, 2, 3], [4, 5, 6]]; - let b = [[7, 8], [9, 10], [11, 12]]; - expect(multiplyingMatrix(a, b)).toEqual([[58, 64], [139, 154]]); - }); - - test('multiplying a matrix (2x2) by another matrix (2x2)', () => { - let a = [[1, 2], [3, 4]]; - let b = [[2, 0], [1, 2]]; - expect(multiplyingMatrix(a, b)).toEqual([[4, 4], [10, 8]]); - }); -}); diff --git a/src/pages/exercises/array-matrix-operations/_codes/js/code/matrix-operations.node.test.js b/src/pages/exercises/array-matrix-operations/_codes/js/code/matrix-operations.test.js similarity index 100% rename from src/pages/exercises/array-matrix-operations/_codes/js/code/matrix-operations.node.test.js rename to src/pages/exercises/array-matrix-operations/_codes/js/code/matrix-operations.test.js diff --git a/src/pages/exercises/array-matrix-operations/_codes/js/response/matrix-operations.jest.test.js b/src/pages/exercises/array-matrix-operations/_codes/js/response/matrix-operations.jest.test.js deleted file mode 100644 index c2a924bf..00000000 --- a/src/pages/exercises/array-matrix-operations/_codes/js/response/matrix-operations.jest.test.js +++ /dev/null @@ -1,27 +0,0 @@ -import { addingMatrix, multiplyingMatrix } from './matrix-operations.js'; - -describe('Matrix Operation', () => { - test('adding a matrix (2x2) by another matrix (2x2)', () => { - let a = [[3, 8], [4, 6]]; - let b = [[4, 0], [1, -9]]; - expect(addingMatrix(a, b)).toEqual([[7, 8], [5, -3]]); - }); - - test('adding a matrix (3x3) by another matrix (3x3)', () => { - let a = [[3, 8, 3], [4, 6, -1], [3, 8, 3]]; - let b = [[4, 0, 5], [1, -9, 0], [3, 8, 3]]; - expect(addingMatrix(a, b)).toEqual([[7, 8, 8], [5, -3, -1], [6, 16, 6]]); - }); - - test('multiplying a matrix (2x3) by another matrix (3x2)', () => { - let a = [[1, 2, 3], [4, 5, 6]]; - let b = [[7, 8], [9, 10], [11, 12]]; - expect(multiplyingMatrix(a, b)).toEqual([[58, 64], [139, 154]]); - }); - - test('multiplying a matrix (2x2) by another matrix (2x2)', () => { - let a = [[1, 2], [3, 4]]; - let b = [[2, 0], [1, 2]]; - expect(multiplyingMatrix(a, b)).toEqual([[4, 4], [10, 8]]); - }); -}); diff --git a/src/pages/exercises/array-matrix-operations/_codes/js/response/matrix-operations.node.test.js b/src/pages/exercises/array-matrix-operations/_codes/js/response/matrix-operations.test.js similarity index 100% rename from src/pages/exercises/array-matrix-operations/_codes/js/response/matrix-operations.node.test.js rename to src/pages/exercises/array-matrix-operations/_codes/js/response/matrix-operations.test.js diff --git a/src/pages/exercises/array-min-withdraw/_codes/js/code/min-withdraw.jest.test.js b/src/pages/exercises/array-min-withdraw/_codes/js/code/min-withdraw.jest.test.js deleted file mode 100644 index 0501cba1..00000000 --- a/src/pages/exercises/array-min-withdraw/_codes/js/code/min-withdraw.jest.test.js +++ /dev/null @@ -1,15 +0,0 @@ -import { withdraw } from './min-withdraw.js'; - -describe('Minimum withdraw', () => { - test('minimum of 1280', () => { - expect(withdraw(1280)).toEqual([[100, 12], [50, 1], [20, 1], [10, 1]]); - }); - - test('minimum of 5705', () => { - expect(withdraw(5705)).toEqual([[100, 57], [5, 1]]); - }); - - test('minimum of 892', () => { - expect(withdraw(892)).toEqual([[100, 8], [50, 1], [20, 2], [2, 1]]); - }); -}); diff --git a/src/pages/exercises/array-min-withdraw/_codes/js/code/min-withdraw.node.test.js b/src/pages/exercises/array-min-withdraw/_codes/js/code/min-withdraw.test.js similarity index 100% rename from src/pages/exercises/array-min-withdraw/_codes/js/code/min-withdraw.node.test.js rename to src/pages/exercises/array-min-withdraw/_codes/js/code/min-withdraw.test.js diff --git a/src/pages/exercises/array-min-withdraw/_codes/js/response/min-withdraw.jest.test.js b/src/pages/exercises/array-min-withdraw/_codes/js/response/min-withdraw.jest.test.js deleted file mode 100644 index 0501cba1..00000000 --- a/src/pages/exercises/array-min-withdraw/_codes/js/response/min-withdraw.jest.test.js +++ /dev/null @@ -1,15 +0,0 @@ -import { withdraw } from './min-withdraw.js'; - -describe('Minimum withdraw', () => { - test('minimum of 1280', () => { - expect(withdraw(1280)).toEqual([[100, 12], [50, 1], [20, 1], [10, 1]]); - }); - - test('minimum of 5705', () => { - expect(withdraw(5705)).toEqual([[100, 57], [5, 1]]); - }); - - test('minimum of 892', () => { - expect(withdraw(892)).toEqual([[100, 8], [50, 1], [20, 2], [2, 1]]); - }); -}); diff --git a/src/pages/exercises/array-min-withdraw/_codes/js/response/min-withdraw.node.test.js b/src/pages/exercises/array-min-withdraw/_codes/js/response/min-withdraw.test.js similarity index 100% rename from src/pages/exercises/array-min-withdraw/_codes/js/response/min-withdraw.node.test.js rename to src/pages/exercises/array-min-withdraw/_codes/js/response/min-withdraw.test.js diff --git a/src/pages/exercises/array-operations/_codes/js/code/array-operations.jest.test.js b/src/pages/exercises/array-operations/_codes/js/code/array-operations.jest.test.js deleted file mode 100644 index 44aa1d3a..00000000 --- a/src/pages/exercises/array-operations/_codes/js/code/array-operations.jest.test.js +++ /dev/null @@ -1,33 +0,0 @@ -import { sum, product, sumOdds } from './array-operations.js'; - -describe('Array Operation', () => { - describe('sum()', () => { - it('should return sum of values', () => { - expect(sum([1, 2, 3])).toBe(6); - - expect(sum([2, 2, 2])).toBe(6); - - expect(sum([1, 2, 3, 4, 5, 6])).toBe(21); - }); - }); - - describe.skip('sumOdds()', () => { - it('should return sum of odd values', () => { - expect(sumOdds([1, 2, 3])).toBe(4); - - expect(sumOdds([2, 2, 2])).toBe(0); - - expect(sumOdds([1, 2, 3, 4, 5, 6])).toBe(9); - }); - }); - - describe.skip('product()', () => { - it('should return product of values', () => { - expect(product([1, 2, 3])).toBe(6); - - expect(product([2, 2, 2])).toBe(8); - - expect(product([1, 2, 3, 4, 5, 6])).toBe(720); - }); - }); -}); diff --git a/src/pages/exercises/array-operations/_codes/js/code/array-operations.node.test.js b/src/pages/exercises/array-operations/_codes/js/code/array-operations.test.js similarity index 100% rename from src/pages/exercises/array-operations/_codes/js/code/array-operations.node.test.js rename to src/pages/exercises/array-operations/_codes/js/code/array-operations.test.js diff --git a/src/pages/exercises/array-operations/_codes/js/response/array-operations.jest.test.js b/src/pages/exercises/array-operations/_codes/js/response/array-operations.jest.test.js deleted file mode 100644 index 44aa1d3a..00000000 --- a/src/pages/exercises/array-operations/_codes/js/response/array-operations.jest.test.js +++ /dev/null @@ -1,33 +0,0 @@ -import { sum, product, sumOdds } from './array-operations.js'; - -describe('Array Operation', () => { - describe('sum()', () => { - it('should return sum of values', () => { - expect(sum([1, 2, 3])).toBe(6); - - expect(sum([2, 2, 2])).toBe(6); - - expect(sum([1, 2, 3, 4, 5, 6])).toBe(21); - }); - }); - - describe.skip('sumOdds()', () => { - it('should return sum of odd values', () => { - expect(sumOdds([1, 2, 3])).toBe(4); - - expect(sumOdds([2, 2, 2])).toBe(0); - - expect(sumOdds([1, 2, 3, 4, 5, 6])).toBe(9); - }); - }); - - describe.skip('product()', () => { - it('should return product of values', () => { - expect(product([1, 2, 3])).toBe(6); - - expect(product([2, 2, 2])).toBe(8); - - expect(product([1, 2, 3, 4, 5, 6])).toBe(720); - }); - }); -}); diff --git a/src/pages/exercises/array-operations/_codes/js/response/array-operations.node.test.js b/src/pages/exercises/array-operations/_codes/js/response/array-operations.test.js similarity index 100% rename from src/pages/exercises/array-operations/_codes/js/response/array-operations.node.test.js rename to src/pages/exercises/array-operations/_codes/js/response/array-operations.test.js diff --git a/src/pages/exercises/array-prime-factors/_codes/js/code/prime-factors.jest.test.js b/src/pages/exercises/array-prime-factors/_codes/js/code/prime-factors.jest.test.js deleted file mode 100644 index 6500b987..00000000 --- a/src/pages/exercises/array-prime-factors/_codes/js/code/prime-factors.jest.test.js +++ /dev/null @@ -1,47 +0,0 @@ -import { primeFactors } from './prime-factors.js'; - -describe('Prime Factors', function() { - test('returning an empty array for 1', function() { - expect(primeFactors(1)).toEqual([]); - }); - - test('factoring 2', function() { - expect(primeFactors(2)).toEqual([2]); - }); - - test('factoring 3', function() { - expect(primeFactors(3)).toEqual([3]); - }); - - test('factoring 4', function() { - expect(primeFactors(4)).toEqual([2, 2]); - }); - - test('factoring 6', function() { - expect(primeFactors(6)).toEqual([2, 3]); - }); - - test('factoring 8', function() { - expect(primeFactors(8)).toEqual([2, 2, 2]); - }); - - test('factoring 9', function() { - expect(primeFactors(9)).toEqual([3, 3]); - }); - - test('factoring 27', function() { - expect(primeFactors(27)).toEqual([3, 3, 3]); - }); - - test('factoring 625', function() { - expect(primeFactors(625)).toEqual([5, 5, 5, 5]); - }); - - test('factoring 901255', function() { - expect(primeFactors(901255)).toEqual([5, 17, 23, 461]); - }); - - test('factoring 93819012551', function() { - expect(primeFactors(93819012551)).toEqual([11, 9539, 894119]); - }); -}); diff --git a/src/pages/exercises/array-prime-factors/_codes/js/code/prime-factors.node.test.js b/src/pages/exercises/array-prime-factors/_codes/js/code/prime-factors.test.js similarity index 100% rename from src/pages/exercises/array-prime-factors/_codes/js/code/prime-factors.node.test.js rename to src/pages/exercises/array-prime-factors/_codes/js/code/prime-factors.test.js diff --git a/src/pages/exercises/array-prime-factors/_codes/js/response/prime-factors.jest.test.js b/src/pages/exercises/array-prime-factors/_codes/js/response/prime-factors.jest.test.js deleted file mode 100644 index 6500b987..00000000 --- a/src/pages/exercises/array-prime-factors/_codes/js/response/prime-factors.jest.test.js +++ /dev/null @@ -1,47 +0,0 @@ -import { primeFactors } from './prime-factors.js'; - -describe('Prime Factors', function() { - test('returning an empty array for 1', function() { - expect(primeFactors(1)).toEqual([]); - }); - - test('factoring 2', function() { - expect(primeFactors(2)).toEqual([2]); - }); - - test('factoring 3', function() { - expect(primeFactors(3)).toEqual([3]); - }); - - test('factoring 4', function() { - expect(primeFactors(4)).toEqual([2, 2]); - }); - - test('factoring 6', function() { - expect(primeFactors(6)).toEqual([2, 3]); - }); - - test('factoring 8', function() { - expect(primeFactors(8)).toEqual([2, 2, 2]); - }); - - test('factoring 9', function() { - expect(primeFactors(9)).toEqual([3, 3]); - }); - - test('factoring 27', function() { - expect(primeFactors(27)).toEqual([3, 3, 3]); - }); - - test('factoring 625', function() { - expect(primeFactors(625)).toEqual([5, 5, 5, 5]); - }); - - test('factoring 901255', function() { - expect(primeFactors(901255)).toEqual([5, 17, 23, 461]); - }); - - test('factoring 93819012551', function() { - expect(primeFactors(93819012551)).toEqual([11, 9539, 894119]); - }); -}); diff --git a/src/pages/exercises/array-prime-factors/_codes/js/response/prime-factors.node.test.js b/src/pages/exercises/array-prime-factors/_codes/js/response/prime-factors.test.js similarity index 100% rename from src/pages/exercises/array-prime-factors/_codes/js/response/prime-factors.node.test.js rename to src/pages/exercises/array-prime-factors/_codes/js/response/prime-factors.test.js diff --git a/src/pages/exercises/array-prime-numbers/_codes/js/code/prime-numbers.jest.test.js b/src/pages/exercises/array-prime-numbers/_codes/js/code/prime-numbers.jest.test.js deleted file mode 100644 index 784d61c3..00000000 --- a/src/pages/exercises/array-prime-numbers/_codes/js/code/prime-numbers.jest.test.js +++ /dev/null @@ -1,23 +0,0 @@ -import { primeNumbers } from './prime-numbers.js'; - -describe('Number Tools', () => { - test('looking for the first 4 prime numbers', () => { - expect(primeNumbers(4)).toEqual([2, 3, 5, 7]); - }); - - test('looking for the first 6 prime numbers', () => { - expect(primeNumbers(6)).toEqual([2, 3, 5, 7, 11, 13]); - }); - - test('looking for prime numbers >= 2 and <= 10', () => { - expect(primeNumbers(2, 10)).toEqual([2, 3, 5, 7]); - }); - - test('looking for prime numbers >= 2 and <= 20', () => { - expect(primeNumbers(2, 20)).toEqual([2, 3, 5, 7, 11, 13, 17, 19]); - }); - - test('looking for prime numbers >= 10 and <= 2', () => { - expect(primeNumbers(10, 2)).toEqual([]); - }); -}); diff --git a/src/pages/exercises/array-prime-numbers/_codes/js/code/prime-numbers.node.test.js b/src/pages/exercises/array-prime-numbers/_codes/js/code/prime-numbers.test.js similarity index 100% rename from src/pages/exercises/array-prime-numbers/_codes/js/code/prime-numbers.node.test.js rename to src/pages/exercises/array-prime-numbers/_codes/js/code/prime-numbers.test.js diff --git a/src/pages/exercises/array-prime-numbers/_codes/js/response/prime-numbers.jest.test.js b/src/pages/exercises/array-prime-numbers/_codes/js/response/prime-numbers.jest.test.js deleted file mode 100644 index 784d61c3..00000000 --- a/src/pages/exercises/array-prime-numbers/_codes/js/response/prime-numbers.jest.test.js +++ /dev/null @@ -1,23 +0,0 @@ -import { primeNumbers } from './prime-numbers.js'; - -describe('Number Tools', () => { - test('looking for the first 4 prime numbers', () => { - expect(primeNumbers(4)).toEqual([2, 3, 5, 7]); - }); - - test('looking for the first 6 prime numbers', () => { - expect(primeNumbers(6)).toEqual([2, 3, 5, 7, 11, 13]); - }); - - test('looking for prime numbers >= 2 and <= 10', () => { - expect(primeNumbers(2, 10)).toEqual([2, 3, 5, 7]); - }); - - test('looking for prime numbers >= 2 and <= 20', () => { - expect(primeNumbers(2, 20)).toEqual([2, 3, 5, 7, 11, 13, 17, 19]); - }); - - test('looking for prime numbers >= 10 and <= 2', () => { - expect(primeNumbers(10, 2)).toEqual([]); - }); -}); diff --git a/src/pages/exercises/array-prime-numbers/_codes/js/response/prime-numbers.node.test.js b/src/pages/exercises/array-prime-numbers/_codes/js/response/prime-numbers.test.js similarity index 100% rename from src/pages/exercises/array-prime-numbers/_codes/js/response/prime-numbers.node.test.js rename to src/pages/exercises/array-prime-numbers/_codes/js/response/prime-numbers.test.js diff --git a/src/pages/exercises/array-products-qtd/_codes/js/code/products-qtd.jest.test.js b/src/pages/exercises/array-products-qtd/_codes/js/code/products-qtd.jest.test.js deleted file mode 100644 index ad273f3c..00000000 --- a/src/pages/exercises/array-products-qtd/_codes/js/code/products-qtd.jest.test.js +++ /dev/null @@ -1,31 +0,0 @@ -import { gtZero, subTotal, total } from './products-qtd.js'; - -describe('Cart Tool', () => { - const products = [ - [1, 10.0, 2], - [2, 10.0, 2], - [3, 10.0, 2], - [4, 10.0, 0], - ]; - - test('filtering greater than zero', () => { - expect(gtZero(products)).toEqual([ - [1, 10.0, 2], - [2, 10.0, 2], - [3, 10.0, 2], - ]); - }); - - test('calculating subtotal', () => { - expect(subTotal(products)).toEqual([ - [1, 20.0], - [2, 20.0], - [3, 20.0], - [4, 0.0], - ]); - }); - - test('calculating total', () => { - expect(total(products)).toBe(60.0); - }); -}); diff --git a/src/pages/exercises/array-products-qtd/_codes/js/code/products-qtd.node.test.js b/src/pages/exercises/array-products-qtd/_codes/js/code/products-qtd.test.js similarity index 100% rename from src/pages/exercises/array-products-qtd/_codes/js/code/products-qtd.node.test.js rename to src/pages/exercises/array-products-qtd/_codes/js/code/products-qtd.test.js diff --git a/src/pages/exercises/array-products-qtd/_codes/js/response/products-qtd.jest.test.js b/src/pages/exercises/array-products-qtd/_codes/js/response/products-qtd.jest.test.js deleted file mode 100644 index ad273f3c..00000000 --- a/src/pages/exercises/array-products-qtd/_codes/js/response/products-qtd.jest.test.js +++ /dev/null @@ -1,31 +0,0 @@ -import { gtZero, subTotal, total } from './products-qtd.js'; - -describe('Cart Tool', () => { - const products = [ - [1, 10.0, 2], - [2, 10.0, 2], - [3, 10.0, 2], - [4, 10.0, 0], - ]; - - test('filtering greater than zero', () => { - expect(gtZero(products)).toEqual([ - [1, 10.0, 2], - [2, 10.0, 2], - [3, 10.0, 2], - ]); - }); - - test('calculating subtotal', () => { - expect(subTotal(products)).toEqual([ - [1, 20.0], - [2, 20.0], - [3, 20.0], - [4, 0.0], - ]); - }); - - test('calculating total', () => { - expect(total(products)).toBe(60.0); - }); -}); diff --git a/src/pages/exercises/array-products-qtd/_codes/js/response/products-qtd.node.test.js b/src/pages/exercises/array-products-qtd/_codes/js/response/products-qtd.test.js similarity index 100% rename from src/pages/exercises/array-products-qtd/_codes/js/response/products-qtd.node.test.js rename to src/pages/exercises/array-products-qtd/_codes/js/response/products-qtd.test.js diff --git a/src/pages/exercises/array-products/_codes/js/code/products.jest.test.js b/src/pages/exercises/array-products/_codes/js/code/products.jest.test.js deleted file mode 100644 index 3057656c..00000000 --- a/src/pages/exercises/array-products/_codes/js/code/products.jest.test.js +++ /dev/null @@ -1,12 +0,0 @@ -import { total } from './products.js'; - -describe('Cart Tool', () => { - const products = [ - ['Bicicleta', 1200.0], - ['Capacete', 450.0], - ]; - - test('counting total cart', () => { - expect(total(products)).toBe(1650.0); - }); -}); diff --git a/src/pages/exercises/array-products/_codes/js/code/products.node.test.js b/src/pages/exercises/array-products/_codes/js/code/products.test.js similarity index 100% rename from src/pages/exercises/array-products/_codes/js/code/products.node.test.js rename to src/pages/exercises/array-products/_codes/js/code/products.test.js diff --git a/src/pages/exercises/array-products/_codes/js/response/products.jest.test.js b/src/pages/exercises/array-products/_codes/js/response/products.jest.test.js deleted file mode 100644 index 3057656c..00000000 --- a/src/pages/exercises/array-products/_codes/js/response/products.jest.test.js +++ /dev/null @@ -1,12 +0,0 @@ -import { total } from './products.js'; - -describe('Cart Tool', () => { - const products = [ - ['Bicicleta', 1200.0], - ['Capacete', 450.0], - ]; - - test('counting total cart', () => { - expect(total(products)).toBe(1650.0); - }); -}); diff --git a/src/pages/exercises/array-products/_codes/js/response/products.node.test.js b/src/pages/exercises/array-products/_codes/js/response/products.test.js similarity index 100% rename from src/pages/exercises/array-products/_codes/js/response/products.node.test.js rename to src/pages/exercises/array-products/_codes/js/response/products.test.js diff --git a/src/pages/exercises/array-roman-number/_codes/js/code/roman-number.jest.test.js b/src/pages/exercises/array-roman-number/_codes/js/code/roman-number.jest.test.js deleted file mode 100644 index ef14aec7..00000000 --- a/src/pages/exercises/array-roman-number/_codes/js/code/roman-number.jest.test.js +++ /dev/null @@ -1,75 +0,0 @@ -import { toRoman } from './roman-number.js'; - -describe('Roman Number', function() { - test('converting 1', function() { - expect(toRoman(1)).toEqual('I'); - }); - - test('converting 2', function() { - expect(toRoman(2)).toEqual('II'); - }); - - test('converting 3', function() { - expect(toRoman(3)).toEqual('III'); - }); - - test('converting 4', function() { - expect(toRoman(4)).toEqual('IV'); - }); - - test('converting 5', function() { - expect(toRoman(5)).toEqual('V'); - }); - - test('converting 6', function() { - expect(toRoman(6)).toEqual('VI'); - }); - - test('converting 9', function() { - expect(toRoman(9)).toEqual('IX'); - }); - - test('converting 27', function() { - expect(toRoman(27)).toEqual('XXVII'); - }); - - test('converting 48', function() { - expect(toRoman(48)).toEqual('XLVIII'); - }); - - test('converting 59', function() { - expect(toRoman(59)).toEqual('LIX'); - }); - - test('converting 93', function() { - expect(toRoman(93)).toEqual('XCIII'); - }); - - test('converting 141', function() { - expect(toRoman(141)).toEqual('CXLI'); - }); - - test('converting 163', function() { - expect(toRoman(163)).toEqual('CLXIII'); - }); - - test('converting 402', function() { - expect(toRoman(402)).toEqual('CDII'); - }); - - test('converting 575', function() { - expect(toRoman(575)).toEqual('DLXXV'); - }); - - test('converting 911', function() { - expect(toRoman(911)).toEqual('CMXI'); - }); - - test('converting 1024', function() { - expect(toRoman(1024)).toEqual('MXXIV'); - }); - - test('converting 3000', function() { - expect(toRoman(3000)).toEqual('MMM'); - }); -}); diff --git a/src/pages/exercises/array-roman-number/_codes/js/code/roman-number.node.test.js b/src/pages/exercises/array-roman-number/_codes/js/code/roman-number.test.js similarity index 100% rename from src/pages/exercises/array-roman-number/_codes/js/code/roman-number.node.test.js rename to src/pages/exercises/array-roman-number/_codes/js/code/roman-number.test.js diff --git a/src/pages/exercises/array-roman-number/_codes/js/response/roman-number.jest.test.js b/src/pages/exercises/array-roman-number/_codes/js/response/roman-number.jest.test.js deleted file mode 100644 index ef14aec7..00000000 --- a/src/pages/exercises/array-roman-number/_codes/js/response/roman-number.jest.test.js +++ /dev/null @@ -1,75 +0,0 @@ -import { toRoman } from './roman-number.js'; - -describe('Roman Number', function() { - test('converting 1', function() { - expect(toRoman(1)).toEqual('I'); - }); - - test('converting 2', function() { - expect(toRoman(2)).toEqual('II'); - }); - - test('converting 3', function() { - expect(toRoman(3)).toEqual('III'); - }); - - test('converting 4', function() { - expect(toRoman(4)).toEqual('IV'); - }); - - test('converting 5', function() { - expect(toRoman(5)).toEqual('V'); - }); - - test('converting 6', function() { - expect(toRoman(6)).toEqual('VI'); - }); - - test('converting 9', function() { - expect(toRoman(9)).toEqual('IX'); - }); - - test('converting 27', function() { - expect(toRoman(27)).toEqual('XXVII'); - }); - - test('converting 48', function() { - expect(toRoman(48)).toEqual('XLVIII'); - }); - - test('converting 59', function() { - expect(toRoman(59)).toEqual('LIX'); - }); - - test('converting 93', function() { - expect(toRoman(93)).toEqual('XCIII'); - }); - - test('converting 141', function() { - expect(toRoman(141)).toEqual('CXLI'); - }); - - test('converting 163', function() { - expect(toRoman(163)).toEqual('CLXIII'); - }); - - test('converting 402', function() { - expect(toRoman(402)).toEqual('CDII'); - }); - - test('converting 575', function() { - expect(toRoman(575)).toEqual('DLXXV'); - }); - - test('converting 911', function() { - expect(toRoman(911)).toEqual('CMXI'); - }); - - test('converting 1024', function() { - expect(toRoman(1024)).toEqual('MXXIV'); - }); - - test('converting 3000', function() { - expect(toRoman(3000)).toEqual('MMM'); - }); -}); diff --git a/src/pages/exercises/array-roman-number/_codes/js/response/roman-number.node.test.js b/src/pages/exercises/array-roman-number/_codes/js/response/roman-number.test.js similarity index 100% rename from src/pages/exercises/array-roman-number/_codes/js/response/roman-number.node.test.js rename to src/pages/exercises/array-roman-number/_codes/js/response/roman-number.test.js diff --git a/src/pages/exercises/array-sum-all-numbers/_codes/js/code/sum-all-numbers-in-array.jest.test.js b/src/pages/exercises/array-sum-all-numbers/_codes/js/code/sum-all-numbers-in-array.jest.test.js deleted file mode 100644 index b1c292df..00000000 --- a/src/pages/exercises/array-sum-all-numbers/_codes/js/code/sum-all-numbers-in-array.jest.test.js +++ /dev/null @@ -1,28 +0,0 @@ -import { sumIntegerInArray } from './sum-all-numbers-in-array'; - -describe('Sum all integers in an Array', () => { - test('Should return 0 for a empty array', () => { - const array = []; - expect(sumIntegerInArray(array)).toEqual(0); - }); - - test('For a regular array', () => { - const regularArray = [1, 2, 3, 20]; - expect(sumIntegerInArray(regularArray)).toEqual(26); - }); - - test('For a 2D array', () => { - const array2d = [[1, 3], [2, 2]]; - expect(sumIntegerInArray(array2d)).toEqual(8); - }); - - test('For a totally random array', () => { - const randomArray = [2, [3, 4], [3, 1]]; - expect(sumIntegerInArray(randomArray)).toEqual(13); - }); - - test('A random Array with empty arrays', () => { - const arrayWithEmptyArrays = [1, 3, [3, 2, []], [3], []]; - expect(sumIntegerInArray(arrayWithEmptyArrays)).toEqual(12); - }); -}); diff --git a/src/pages/exercises/array-sum-all-numbers/_codes/js/code/sum-all-numbers-in-array.node.test.js b/src/pages/exercises/array-sum-all-numbers/_codes/js/code/sum-all-numbers-in-array.test.js similarity index 100% rename from src/pages/exercises/array-sum-all-numbers/_codes/js/code/sum-all-numbers-in-array.node.test.js rename to src/pages/exercises/array-sum-all-numbers/_codes/js/code/sum-all-numbers-in-array.test.js diff --git a/src/pages/exercises/array-sum-all-numbers/_codes/js/response/sum-all-numbers-in-array.jest.test.js b/src/pages/exercises/array-sum-all-numbers/_codes/js/response/sum-all-numbers-in-array.jest.test.js deleted file mode 100644 index b1c292df..00000000 --- a/src/pages/exercises/array-sum-all-numbers/_codes/js/response/sum-all-numbers-in-array.jest.test.js +++ /dev/null @@ -1,28 +0,0 @@ -import { sumIntegerInArray } from './sum-all-numbers-in-array'; - -describe('Sum all integers in an Array', () => { - test('Should return 0 for a empty array', () => { - const array = []; - expect(sumIntegerInArray(array)).toEqual(0); - }); - - test('For a regular array', () => { - const regularArray = [1, 2, 3, 20]; - expect(sumIntegerInArray(regularArray)).toEqual(26); - }); - - test('For a 2D array', () => { - const array2d = [[1, 3], [2, 2]]; - expect(sumIntegerInArray(array2d)).toEqual(8); - }); - - test('For a totally random array', () => { - const randomArray = [2, [3, 4], [3, 1]]; - expect(sumIntegerInArray(randomArray)).toEqual(13); - }); - - test('A random Array with empty arrays', () => { - const arrayWithEmptyArrays = [1, 3, [3, 2, []], [3], []]; - expect(sumIntegerInArray(arrayWithEmptyArrays)).toEqual(12); - }); -}); diff --git a/src/pages/exercises/array-sum-all-numbers/_codes/js/response/sum-all-numbers-in-array.node.test.js b/src/pages/exercises/array-sum-all-numbers/_codes/js/response/sum-all-numbers-in-array.test.js similarity index 100% rename from src/pages/exercises/array-sum-all-numbers/_codes/js/response/sum-all-numbers-in-array.node.test.js rename to src/pages/exercises/array-sum-all-numbers/_codes/js/response/sum-all-numbers-in-array.test.js diff --git a/src/pages/exercises/array-util/_codes/js/code/array-util.jest.test.js b/src/pages/exercises/array-util/_codes/js/code/array-util.jest.test.js deleted file mode 100644 index d3136088..00000000 --- a/src/pages/exercises/array-util/_codes/js/code/array-util.jest.test.js +++ /dev/null @@ -1,55 +0,0 @@ -import { min, max, range, zip, uniq, sortNum } from './array-util.js'; - -describe('Array Util', () => { - test('finding lowest value in [1, 4, 2, 6, 10, 3]', () => { - expect(min([1, 4, 2, 6, 10, 3])).toBe(1); - }); - - test.skip('finding lowest value in [1, 4, -1, 6, 10, 3]', () => { - expect(min([1, 4, -1, 6, 10, 3])).toBe(-1); - }); - - test.skip('finding greatest value in [1, 4, 2, 6, 10, 3]', () => { - expect(max([1, 4, 2, 6, 10, 3])).toBe(10); - }); - - test.skip('generating range of numbers from 0 to 10', () => { - expect(range(10)).toEqual([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]); - }); - - test.skip('generating range of numbers from 1 to 11', () => { - expect(range(1, 11)).toEqual([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); - }); - - test.skip('generating range of numbers from 0 to 10 with steps', () => { - expect(range(0, 30, 5)).toEqual([0, 5, 10, 15, 20, 25]); - }); - - test.skip("generating zip of ['moe', 'larry'] and [30, 40]", () => { - expect(zip(['moe', 'larry'], [30, 40])).toEqual([['moe', 30], ['larry', 40]]); - }); - - test.skip("generating zip of ['moe', 'larry', 'curly'], [30, 40, 50] and [true, false, false]", () => { - expect(zip(['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false])).toEqual([ - ['moe', 30, true], - ['larry', 40, false], - ['curly', 50, false], - ]); - }); - - test.skip('removing duplicate values in [1, 2, 1, 4, 1, 3]', () => { - expect(uniq([1, 2, 1, 4, 1, 3])).toEqual([1, 2, 4, 3]); - }); - - test.skip('removing duplicate values in [1, 2, 1, 3, 3]', () => { - expect(uniq([1, 2, 1, 3, 3])).toEqual([1, 2, 3]); - }); - - test.skip('sorting number values in [1, 3, 2]', () => { - expect(sortNum([1, 3, 2])).toEqual([1, 2, 3]); - }); - - test.skip('sorting number values in [1, 2, 10, 3, 32]', () => { - expect(sortNum([1, 2, 10, 3, 32])).toEqual([1, 2, 3, 10, 32]); - }); -}); diff --git a/src/pages/exercises/array-util/_codes/js/code/array-util.node.test.js b/src/pages/exercises/array-util/_codes/js/code/array-util.test.js similarity index 100% rename from src/pages/exercises/array-util/_codes/js/code/array-util.node.test.js rename to src/pages/exercises/array-util/_codes/js/code/array-util.test.js diff --git a/src/pages/exercises/array-util/_codes/js/response/array-util.jest.test.js b/src/pages/exercises/array-util/_codes/js/response/array-util.jest.test.js deleted file mode 100644 index d3136088..00000000 --- a/src/pages/exercises/array-util/_codes/js/response/array-util.jest.test.js +++ /dev/null @@ -1,55 +0,0 @@ -import { min, max, range, zip, uniq, sortNum } from './array-util.js'; - -describe('Array Util', () => { - test('finding lowest value in [1, 4, 2, 6, 10, 3]', () => { - expect(min([1, 4, 2, 6, 10, 3])).toBe(1); - }); - - test.skip('finding lowest value in [1, 4, -1, 6, 10, 3]', () => { - expect(min([1, 4, -1, 6, 10, 3])).toBe(-1); - }); - - test.skip('finding greatest value in [1, 4, 2, 6, 10, 3]', () => { - expect(max([1, 4, 2, 6, 10, 3])).toBe(10); - }); - - test.skip('generating range of numbers from 0 to 10', () => { - expect(range(10)).toEqual([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]); - }); - - test.skip('generating range of numbers from 1 to 11', () => { - expect(range(1, 11)).toEqual([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); - }); - - test.skip('generating range of numbers from 0 to 10 with steps', () => { - expect(range(0, 30, 5)).toEqual([0, 5, 10, 15, 20, 25]); - }); - - test.skip("generating zip of ['moe', 'larry'] and [30, 40]", () => { - expect(zip(['moe', 'larry'], [30, 40])).toEqual([['moe', 30], ['larry', 40]]); - }); - - test.skip("generating zip of ['moe', 'larry', 'curly'], [30, 40, 50] and [true, false, false]", () => { - expect(zip(['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false])).toEqual([ - ['moe', 30, true], - ['larry', 40, false], - ['curly', 50, false], - ]); - }); - - test.skip('removing duplicate values in [1, 2, 1, 4, 1, 3]', () => { - expect(uniq([1, 2, 1, 4, 1, 3])).toEqual([1, 2, 4, 3]); - }); - - test.skip('removing duplicate values in [1, 2, 1, 3, 3]', () => { - expect(uniq([1, 2, 1, 3, 3])).toEqual([1, 2, 3]); - }); - - test.skip('sorting number values in [1, 3, 2]', () => { - expect(sortNum([1, 3, 2])).toEqual([1, 2, 3]); - }); - - test.skip('sorting number values in [1, 2, 10, 3, 32]', () => { - expect(sortNum([1, 2, 10, 3, 32])).toEqual([1, 2, 3, 10, 32]); - }); -}); diff --git a/src/pages/exercises/array-util/_codes/js/response/array-util.node.test.js b/src/pages/exercises/array-util/_codes/js/response/array-util.test.js similarity index 100% rename from src/pages/exercises/array-util/_codes/js/response/array-util.node.test.js rename to src/pages/exercises/array-util/_codes/js/response/array-util.test.js diff --git a/src/pages/exercises/function-area-of-circle/_codes/js/code/area-of-circle.jest.test.js b/src/pages/exercises/function-area-of-circle/_codes/js/code/area-of-circle.jest.test.js deleted file mode 100644 index 4cbbf493..00000000 --- a/src/pages/exercises/function-area-of-circle/_codes/js/code/area-of-circle.jest.test.js +++ /dev/null @@ -1,11 +0,0 @@ -import { areaOfCircle } from './area-of-circle.js'; - -describe('Circle Tools', () => { - test('Area of the circle of radius 10 is of 31.41592653589793', () => { - expect(areaOfCircle(10)).toBe(314.1592653589793); - }); - - test.skip('Area of the circle of radius 1 is of 3.141592653589793', () => { - expect(areaOfCircle(1)).toBe(3.141592653589793); - }); -}); diff --git a/src/pages/exercises/function-area-of-circle/_codes/js/code/area-of-circle.node.test.js b/src/pages/exercises/function-area-of-circle/_codes/js/code/area-of-circle.test.js similarity index 100% rename from src/pages/exercises/function-area-of-circle/_codes/js/code/area-of-circle.node.test.js rename to src/pages/exercises/function-area-of-circle/_codes/js/code/area-of-circle.test.js diff --git a/src/pages/exercises/function-area-of-circle/_codes/js/response/area-of-circle.jest.test.js b/src/pages/exercises/function-area-of-circle/_codes/js/response/area-of-circle.jest.test.js deleted file mode 100644 index 868bce6d..00000000 --- a/src/pages/exercises/function-area-of-circle/_codes/js/response/area-of-circle.jest.test.js +++ /dev/null @@ -1,11 +0,0 @@ -import { areaOfCircle } from './area-of-circle.js'; - -describe('Circle Tools', () => { - test('Area of the circle of radius 10 is of 31.41592653589793', () => { - expect(areaOfCircle(10)).toBe(314.1592653589793); - }); - - test('Area of the circle of radius 1 is of 3.141592653589793', () => { - expect(areaOfCircle(1)).toBe(3.141592653589793); - }); -}); diff --git a/src/pages/exercises/function-area-of-circle/_codes/js/response/area-of-circle.node.test.js b/src/pages/exercises/function-area-of-circle/_codes/js/response/area-of-circle.test.js similarity index 100% rename from src/pages/exercises/function-area-of-circle/_codes/js/response/area-of-circle.node.test.js rename to src/pages/exercises/function-area-of-circle/_codes/js/response/area-of-circle.test.js diff --git a/src/pages/exercises/function-calc/_codes/js/code/calc.jest.test.js b/src/pages/exercises/function-calc/_codes/js/code/calc.jest.test.js deleted file mode 100644 index c2ca828c..00000000 --- a/src/pages/exercises/function-calc/_codes/js/code/calc.jest.test.js +++ /dev/null @@ -1,19 +0,0 @@ -import { calc } from './calc.js'; - -describe('Calculator', () => { - test('adding 1 + 1', () => { - expect(calc(1, 1, '+')).toBe(2); - }); - - test.skip('subtracting 1 - 1', () => { - expect(calc(1, 1, '-')).toBe(0); - }); - - test.skip('multiplying 1 * 1', () => { - expect(calc(1, 1, '*')).toBe(1); - }); - - test.skip('dividing 1 / 1', () => { - expect(calc(1, 1, '/')).toBe(1); - }); -}); diff --git a/src/pages/exercises/function-calc/_codes/js/code/calc.node.test.js b/src/pages/exercises/function-calc/_codes/js/code/calc.test.js similarity index 100% rename from src/pages/exercises/function-calc/_codes/js/code/calc.node.test.js rename to src/pages/exercises/function-calc/_codes/js/code/calc.test.js diff --git a/src/pages/exercises/function-calc/_codes/js/response/calc.jest.test.js b/src/pages/exercises/function-calc/_codes/js/response/calc.jest.test.js deleted file mode 100644 index 8ab65c4b..00000000 --- a/src/pages/exercises/function-calc/_codes/js/response/calc.jest.test.js +++ /dev/null @@ -1,19 +0,0 @@ -import { calc } from './calc.js'; - -describe('Calculator', () => { - test('adding 1 + 1', () => { - expect(calc(1, 1, '+')).toBe(2); - }); - - test('subtracting 1 - 1', () => { - expect(calc(1, 1, '-')).toBe(0); - }); - - test('multiplying 1 * 1', () => { - expect(calc(1, 1, '*')).toBe(1); - }); - - test('dividing 1 / 1', () => { - expect(calc(1, 1, '/')).toBe(1); - }); -}); diff --git a/src/pages/exercises/function-calc/_codes/js/response/calc.node.test.js b/src/pages/exercises/function-calc/_codes/js/response/calc.test.js similarity index 100% rename from src/pages/exercises/function-calc/_codes/js/response/calc.node.test.js rename to src/pages/exercises/function-calc/_codes/js/response/calc.test.js diff --git a/src/pages/exercises/function-calendar/_codes/js/code/calendar.jest.test.js b/src/pages/exercises/function-calendar/_codes/js/code/calendar.jest.test.js deleted file mode 100644 index f0620f5e..00000000 --- a/src/pages/exercises/function-calendar/_codes/js/code/calendar.jest.test.js +++ /dev/null @@ -1,59 +0,0 @@ -import { calendar } from './calendar.js'; - -describe('Calendar', () => { - test('making month starting on Sunday and ending on the 31st', () => { - expect(calendar(0, 31)).toBe( - `DOM SEG TER QUA QUI SEX SAB - 01 02 03 04 05 06 07 - 08 09 10 11 12 13 14 - 15 16 17 18 19 20 21 - 22 23 24 25 26 27 28 - 29 30 31`, - ); - }); - - test.skip('making month starting on Monday and ending on the 31st', () => { - expect(calendar(1, 31)).toBe( - `DOM SEG TER QUA QUI SEX SAB - 01 02 03 04 05 06 - 07 08 09 10 11 12 13 - 14 15 16 17 18 19 20 - 21 22 23 24 25 26 27 - 28 29 30 31`, - ); - }); - - test.skip('making month starting on Tuesday and ending on the 30st', () => { - expect(calendar(2, 30)).toBe( - `DOM SEG TER QUA QUI SEX SAB - 01 02 03 04 05 - 06 07 08 09 10 11 12 - 13 14 15 16 17 18 19 - 20 21 22 23 24 25 26 - 27 28 29 30`, - ); - }); - - test.skip('making month starting on Wednesday and ending on the 29st', () => { - expect(calendar(3, 29)).toBe( - `DOM SEG TER QUA QUI SEX SAB - 01 02 03 04 - 05 06 07 08 09 10 11 - 12 13 14 15 16 17 18 - 19 20 21 22 23 24 25 - 26 27 28 29`, - ); - }); - - test.skip('making month starting on Saturday and ending on the 31st', () => { - expect(calendar(6, 31)).toBe( - `DOM SEG TER QUA QUI SEX SAB - 01 - 02 03 04 05 06 07 08 - 09 10 11 12 13 14 15 - 16 17 18 19 20 21 22 - 23 24 25 26 27 28 29 - 30 31`, - ); - }); -}); diff --git a/src/pages/exercises/function-calendar/_codes/js/code/calendar.node.test.js b/src/pages/exercises/function-calendar/_codes/js/code/calendar.test.js similarity index 100% rename from src/pages/exercises/function-calendar/_codes/js/code/calendar.node.test.js rename to src/pages/exercises/function-calendar/_codes/js/code/calendar.test.js diff --git a/src/pages/exercises/function-calendar/_codes/js/response/calendar.jest.test.js b/src/pages/exercises/function-calendar/_codes/js/response/calendar.jest.test.js deleted file mode 100644 index ee983842..00000000 --- a/src/pages/exercises/function-calendar/_codes/js/response/calendar.jest.test.js +++ /dev/null @@ -1,59 +0,0 @@ -import { calendar } from './calendar.js'; - -describe('Calendar', () => { - test('making month starting on Sunday and ending on the 31st', () => { - expect(calendar(0, 31)).toBe( - `DOM SEG TER QUA QUI SEX SAB - 01 02 03 04 05 06 07 - 08 09 10 11 12 13 14 - 15 16 17 18 19 20 21 - 22 23 24 25 26 27 28 - 29 30 31`, - ); - }); - - test('making month starting on Monday and ending on the 31st', () => { - expect(calendar(1, 31)).toBe( - `DOM SEG TER QUA QUI SEX SAB - 01 02 03 04 05 06 - 07 08 09 10 11 12 13 - 14 15 16 17 18 19 20 - 21 22 23 24 25 26 27 - 28 29 30 31`, - ); - }); - - test('making month starting on Tuesday and ending on the 30st', () => { - expect(calendar(2, 30)).toBe( - `DOM SEG TER QUA QUI SEX SAB - 01 02 03 04 05 - 06 07 08 09 10 11 12 - 13 14 15 16 17 18 19 - 20 21 22 23 24 25 26 - 27 28 29 30`, - ); - }); - - test('making month starting on Wednesday and ending on the 29st', () => { - expect(calendar(3, 29)).toBe( - `DOM SEG TER QUA QUI SEX SAB - 01 02 03 04 - 05 06 07 08 09 10 11 - 12 13 14 15 16 17 18 - 19 20 21 22 23 24 25 - 26 27 28 29`, - ); - }); - - test('making month starting on Saturday and ending on the 31st', () => { - expect(calendar(6, 31)).toBe( - `DOM SEG TER QUA QUI SEX SAB - 01 - 02 03 04 05 06 07 08 - 09 10 11 12 13 14 15 - 16 17 18 19 20 21 22 - 23 24 25 26 27 28 29 - 30 31`, - ); - }); -}); diff --git a/src/pages/exercises/function-calendar/_codes/js/response/calendar.node.test.js b/src/pages/exercises/function-calendar/_codes/js/response/calendar.test.js similarity index 100% rename from src/pages/exercises/function-calendar/_codes/js/response/calendar.node.test.js rename to src/pages/exercises/function-calendar/_codes/js/response/calendar.test.js diff --git a/src/pages/exercises/function-factorial/_codes/js/code/factorial.jest.test.js b/src/pages/exercises/function-factorial/_codes/js/code/factorial.jest.test.js deleted file mode 100644 index cdcc6ebe..00000000 --- a/src/pages/exercises/function-factorial/_codes/js/code/factorial.jest.test.js +++ /dev/null @@ -1,19 +0,0 @@ -import { factorial } from './factorial.js'; - -describe('Number Tools', () => { - test('calculating factorial of 1', () => { - expect(factorial(1)).toBe(1); - }); - - test.skip('calculating factorial of 2', () => { - expect(factorial(2)).toBe(2); - }); - - test.skip('calculating factorial of 3', () => { - expect(factorial(3)).toBe(6); - }); - - test.skip('calculating factorial of 4', () => { - expect(factorial(4)).toBe(24); - }); -}); diff --git a/src/pages/exercises/function-factorial/_codes/js/code/factorial.node.test.js b/src/pages/exercises/function-factorial/_codes/js/code/factorial.test.js similarity index 100% rename from src/pages/exercises/function-factorial/_codes/js/code/factorial.node.test.js rename to src/pages/exercises/function-factorial/_codes/js/code/factorial.test.js diff --git a/src/pages/exercises/function-factorial/_codes/js/response/factorial.jest.test.js b/src/pages/exercises/function-factorial/_codes/js/response/factorial.jest.test.js deleted file mode 100644 index a0baa75b..00000000 --- a/src/pages/exercises/function-factorial/_codes/js/response/factorial.jest.test.js +++ /dev/null @@ -1,19 +0,0 @@ -import { factorial } from './factorial.js'; - -describe('Number Tools', () => { - test('calculating factorial of 1', () => { - expect(factorial(1)).toBe(1); - }); - - test('calculating factorial of 2', () => { - expect(factorial(2)).toBe(2); - }); - - test('calculating factorial of 3', () => { - expect(factorial(3)).toBe(6); - }); - - test('calculating factorial of 4', () => { - expect(factorial(4)).toBe(24); - }); -}); diff --git a/src/pages/exercises/function-factorial/_codes/js/response/factorial.node.test.js b/src/pages/exercises/function-factorial/_codes/js/response/factorial.test.js similarity index 100% rename from src/pages/exercises/function-factorial/_codes/js/response/factorial.node.test.js rename to src/pages/exercises/function-factorial/_codes/js/response/factorial.test.js diff --git a/src/pages/exercises/function-fibonacci-nth/_codes/js/code/fibonacci-number.jest.test.js b/src/pages/exercises/function-fibonacci-nth/_codes/js/code/fibonacci-number.jest.test.js deleted file mode 100644 index ec87f3f1..00000000 --- a/src/pages/exercises/function-fibonacci-nth/_codes/js/code/fibonacci-number.jest.test.js +++ /dev/null @@ -1,23 +0,0 @@ -import { fibonacci } from './fibonacci-number.js'; - -describe('Fibonacci series', () => { - test('making the 0th number', () => { - expect(fibonacci(0)).toBe(undefined); - }); - - test.skip('making the 1st numbers', () => { - expect(fibonacci(1)).toBe(0); - }); - - test.skip('making the 2nd numbers', () => { - expect(fibonacci(2)).toBe(1); - }); - - test.skip('making the 4th numbers', () => { - expect(fibonacci(4)).toBe(2); - }); - - test.skip('making the 6th numbers', () => { - expect(fibonacci(6)).toBe(5); - }); -}); diff --git a/src/pages/exercises/function-fibonacci-nth/_codes/js/code/fibonacci-number.node.test.js b/src/pages/exercises/function-fibonacci-nth/_codes/js/code/fibonacci-number.test.js similarity index 100% rename from src/pages/exercises/function-fibonacci-nth/_codes/js/code/fibonacci-number.node.test.js rename to src/pages/exercises/function-fibonacci-nth/_codes/js/code/fibonacci-number.test.js diff --git a/src/pages/exercises/function-fibonacci-nth/_codes/js/response/fibonacci-number.jest.test.js b/src/pages/exercises/function-fibonacci-nth/_codes/js/response/fibonacci-number.jest.test.js deleted file mode 100644 index b09ebd14..00000000 --- a/src/pages/exercises/function-fibonacci-nth/_codes/js/response/fibonacci-number.jest.test.js +++ /dev/null @@ -1,23 +0,0 @@ -import { fibonacci } from './fibonacci-number.js'; - -describe('Fibonacci series', () => { - test('making the 0th number', () => { - expect(fibonacci(0)).toBe(undefined); - }); - - test('making the 1st numbers', () => { - expect(fibonacci(1)).toBe(0); - }); - - test('making the 2nd numbers', () => { - expect(fibonacci(2)).toBe(1); - }); - - test('making the 4th numbers', () => { - expect(fibonacci(4)).toBe(2); - }); - - test('making the 6th numbers', () => { - expect(fibonacci(6)).toBe(5); - }); -}); diff --git a/src/pages/exercises/function-fibonacci-nth/_codes/js/response/fibonacci-number.node.test.js b/src/pages/exercises/function-fibonacci-nth/_codes/js/response/fibonacci-number.test.js similarity index 100% rename from src/pages/exercises/function-fibonacci-nth/_codes/js/response/fibonacci-number.node.test.js rename to src/pages/exercises/function-fibonacci-nth/_codes/js/response/fibonacci-number.test.js diff --git a/src/pages/exercises/function-fibonacci-sequence/_codes/js/code/fibonacci-sequence.jest.test.js b/src/pages/exercises/function-fibonacci-sequence/_codes/js/code/fibonacci-sequence.jest.test.js deleted file mode 100644 index 57b47145..00000000 --- a/src/pages/exercises/function-fibonacci-sequence/_codes/js/code/fibonacci-sequence.jest.test.js +++ /dev/null @@ -1,23 +0,0 @@ -import { fibonacci } from './fibonacci-sequence.js'; - -describe('Fibonacci series', () => { - test('making the first 0 numbers', () => { - expect(fibonacci(0)).toBe(''); - }); - - test.skip('making the first 1 numbers', () => { - expect(fibonacci(1)).toBe('0'); - }); - - test.skip('making the first 2 numbers', () => { - expect(fibonacci(2)).toBe('0, 1'); - }); - - test.skip('making the first 4 numbers', () => { - expect(fibonacci(4)).toBe('0, 1, 1, 2'); - }); - - test.skip('making the first 6 numbers', () => { - expect(fibonacci(6)).toBe('0, 1, 1, 2, 3, 5'); - }); -}); diff --git a/src/pages/exercises/function-fibonacci-sequence/_codes/js/code/fibonacci-sequence.node.test.js b/src/pages/exercises/function-fibonacci-sequence/_codes/js/code/fibonacci-sequence.test.js similarity index 100% rename from src/pages/exercises/function-fibonacci-sequence/_codes/js/code/fibonacci-sequence.node.test.js rename to src/pages/exercises/function-fibonacci-sequence/_codes/js/code/fibonacci-sequence.test.js diff --git a/src/pages/exercises/function-fibonacci-sequence/_codes/js/response/fibonacci-sequence.jest.test.js b/src/pages/exercises/function-fibonacci-sequence/_codes/js/response/fibonacci-sequence.jest.test.js deleted file mode 100644 index a1d94625..00000000 --- a/src/pages/exercises/function-fibonacci-sequence/_codes/js/response/fibonacci-sequence.jest.test.js +++ /dev/null @@ -1,23 +0,0 @@ -import { fibonacci } from './fibonacci-sequence.js'; - -describe('Fibonacci series', () => { - test('making the first 0 numbers', () => { - expect(fibonacci(0)).toBe(''); - }); - - test('making the first 1 numbers', () => { - expect(fibonacci(1)).toBe('0'); - }); - - test('making the first 2 numbers', () => { - expect(fibonacci(2)).toBe('0, 1'); - }); - - test('making the first 4 numbers', () => { - expect(fibonacci(4)).toBe('0, 1, 1, 2'); - }); - - test('making the first 6 numbers', () => { - expect(fibonacci(6)).toBe('0, 1, 1, 2, 3, 5'); - }); -}); diff --git a/src/pages/exercises/function-fibonacci-sequence/_codes/js/response/fibonacci-sequence.node.test.js b/src/pages/exercises/function-fibonacci-sequence/_codes/js/response/fibonacci-sequence.test.js similarity index 100% rename from src/pages/exercises/function-fibonacci-sequence/_codes/js/response/fibonacci-sequence.node.test.js rename to src/pages/exercises/function-fibonacci-sequence/_codes/js/response/fibonacci-sequence.test.js diff --git a/src/pages/exercises/function-figure-text/_codes/js/code/figure-text.jest.test.js b/src/pages/exercises/function-figure-text/_codes/js/code/figure-text.jest.test.js deleted file mode 100644 index cd23ecb3..00000000 --- a/src/pages/exercises/function-figure-text/_codes/js/code/figure-text.jest.test.js +++ /dev/null @@ -1,55 +0,0 @@ -import { triangleText, halfDiamondText, diamondText, boardText } from './figure-text.js'; - -describe('Figure Text Tool', () => { - test('making triangle text with size 1', () => { - expect(triangleText(1)).toBe('#'); - }); - - test.skip('making triangle text with size 2', () => { - expect(triangleText(2)).toBe('# \n' + '##'); - }); - - test.skip('making triangle text with size 3', () => { - expect(triangleText(3)).toBe('# \n' + '## \n' + '###'); - }); - - test.skip('making half diamond text with size 1', () => { - expect(halfDiamondText(1)).toBe('#'); - }); - - test.skip('making half diamond text with size 2', () => { - expect(halfDiamondText(2)).toBe('# \n' + '##\n' + '# '); - }); - - test.skip('making half diamond text with size 3', () => { - expect(halfDiamondText(3)).toBe('# \n' + '## \n' + '###\n' + '## \n' + '# '); - }); - - test.skip('making diamond text with size 1', () => { - expect(diamondText(1)).toBe('#'); - }); - - test.skip('making diamond text with size 2', () => { - expect(diamondText(2)).toBe(' # \n' + '###\n' + ' # '); - }); - - test.skip('making diamond text with size 3', () => { - expect(diamondText(3)).toBe(' # \n' + ' ### \n' + '#####\n' + ' ### \n' + ' # '); - }); - - test.skip('making board text with size 1', () => { - expect(boardText(1)).toBe('#'); - }); - - test.skip('making board text with size 2', () => { - expect(boardText(2)).toBe('# \n' + ' #'); - }); - - test.skip('making board text with size 3', () => { - expect(boardText(3)).toBe('# #\n' + ' # \n' + '# #'); - }); - - test.skip('making board text with size 4', () => { - expect(boardText(4)).toBe('# # \n' + ' # #\n' + '# # \n' + ' # #'); - }); -}); diff --git a/src/pages/exercises/function-figure-text/_codes/js/code/figure-text.node.test.js b/src/pages/exercises/function-figure-text/_codes/js/code/figure-text.test.js similarity index 100% rename from src/pages/exercises/function-figure-text/_codes/js/code/figure-text.node.test.js rename to src/pages/exercises/function-figure-text/_codes/js/code/figure-text.test.js diff --git a/src/pages/exercises/function-figure-text/_codes/js/response/figure-text.jest.test.js b/src/pages/exercises/function-figure-text/_codes/js/response/figure-text.jest.test.js deleted file mode 100644 index f3fe8dcd..00000000 --- a/src/pages/exercises/function-figure-text/_codes/js/response/figure-text.jest.test.js +++ /dev/null @@ -1,55 +0,0 @@ -import { triangleText, halfDiamondText, diamondText, boardText } from './figure-text.js'; - -describe('Figure Text Tool', () => { - test('making triangle text with size 1', () => { - expect(triangleText(1)).toBe('#'); - }); - - test('making triangle text with size 2', () => { - expect(triangleText(2)).toBe('# \n' + '##'); - }); - - test('making triangle text with size 3', () => { - expect(triangleText(3)).toBe('# \n' + '## \n' + '###'); - }); - - test('making half diamond text with size 1', () => { - expect(halfDiamondText(1)).toBe('#'); - }); - - test('making half diamond text with size 2', () => { - expect(halfDiamondText(2)).toBe('# \n' + '##\n' + '# '); - }); - - test('making half diamond text with size 3', () => { - expect(halfDiamondText(3)).toBe('# \n' + '## \n' + '###\n' + '## \n' + '# '); - }); - - test('making diamond text with size 1', () => { - expect(diamondText(1)).toBe('#'); - }); - - test('making diamond text with size 2', () => { - expect(diamondText(2)).toBe(' # \n' + '###\n' + ' # '); - }); - - test('making diamond text with size 3', () => { - expect(diamondText(3)).toBe(' # \n' + ' ### \n' + '#####\n' + ' ### \n' + ' # '); - }); - - test('making board text with size 1', () => { - expect(boardText(1)).toBe('#'); - }); - - test('making board text with size 2', () => { - expect(boardText(2)).toBe('# \n' + ' #'); - }); - - test('making board text with size 3', () => { - expect(boardText(3)).toBe('# #\n' + ' # \n' + '# #'); - }); - - test('making board text with size 4', () => { - expect(boardText(4)).toBe('# # \n' + ' # #\n' + '# # \n' + ' # #'); - }); -}); diff --git a/src/pages/exercises/function-figure-text/_codes/js/response/figure-text.node.test.js b/src/pages/exercises/function-figure-text/_codes/js/response/figure-text.test.js similarity index 100% rename from src/pages/exercises/function-figure-text/_codes/js/response/figure-text.node.test.js rename to src/pages/exercises/function-figure-text/_codes/js/response/figure-text.test.js diff --git a/src/pages/exercises/function-prime-nth/_codes/js/code/prime-nth.jest.test.js b/src/pages/exercises/function-prime-nth/_codes/js/code/prime-nth.jest.test.js deleted file mode 100644 index 21c15e25..00000000 --- a/src/pages/exercises/function-prime-nth/_codes/js/code/prime-nth.jest.test.js +++ /dev/null @@ -1,11 +0,0 @@ -import { nthPrime } from './prime-nth.js'; - -describe('Number Tools', () => { - test('looking for the first 4 prime number', () => { - expect(nthPrime(4)).toBe(7); - }); - - test.skip('looking for the first 6 prime number', () => { - expect(nthPrime(6)).toBe(13); - }); -}); diff --git a/src/pages/exercises/function-prime-nth/_codes/js/code/prime-nth.node.test.js b/src/pages/exercises/function-prime-nth/_codes/js/code/prime-nth.test.js similarity index 100% rename from src/pages/exercises/function-prime-nth/_codes/js/code/prime-nth.node.test.js rename to src/pages/exercises/function-prime-nth/_codes/js/code/prime-nth.test.js diff --git a/src/pages/exercises/function-prime-nth/_codes/js/response/prime-nth.jest.test.js b/src/pages/exercises/function-prime-nth/_codes/js/response/prime-nth.jest.test.js deleted file mode 100644 index 47eb19af..00000000 --- a/src/pages/exercises/function-prime-nth/_codes/js/response/prime-nth.jest.test.js +++ /dev/null @@ -1,11 +0,0 @@ -import { nthPrime } from './prime-nth.js'; - -describe('Number Tools', () => { - test('looking for the first 4 prime number', () => { - expect(nthPrime(4)).toBe(7); - }); - - test('looking for the first 6 prime number', () => { - expect(nthPrime(6)).toBe(13); - }); -}); diff --git a/src/pages/exercises/function-prime-nth/_codes/js/response/prime-nth.node.test.js b/src/pages/exercises/function-prime-nth/_codes/js/response/prime-nth.test.js similarity index 100% rename from src/pages/exercises/function-prime-nth/_codes/js/response/prime-nth.node.test.js rename to src/pages/exercises/function-prime-nth/_codes/js/response/prime-nth.test.js diff --git a/src/pages/exercises/function-prime/_codes/js/code/prime.jest.test.js b/src/pages/exercises/function-prime/_codes/js/code/prime.jest.test.js deleted file mode 100644 index b41950c4..00000000 --- a/src/pages/exercises/function-prime/_codes/js/code/prime.jest.test.js +++ /dev/null @@ -1,27 +0,0 @@ -import { isPrime } from './prime.js'; - -describe('Number Tools', () => { - test('checking if the number 2 is prime', () => { - expect(isPrime(2)).toBe(true); - }); - - test.skip('checking if the number 3 is prime', () => { - expect(isPrime(3)).toBe(true); - }); - - test.skip('checking if the number 4 is prime', () => { - expect(isPrime(4)).toBe(false); - }); - - test.skip('checking if the number 5 is prime', () => { - expect(isPrime(5)).toBe(true); - }); - - test.skip('checking if the number 6 is prime', () => { - expect(isPrime(6)).toBe(false); - }); - - test.skip('checking if the number 7 is prime', () => { - expect(isPrime(7)).toBe(true); - }); -}); diff --git a/src/pages/exercises/function-prime/_codes/js/code/prime.node.test.js b/src/pages/exercises/function-prime/_codes/js/code/prime.test.js similarity index 100% rename from src/pages/exercises/function-prime/_codes/js/code/prime.node.test.js rename to src/pages/exercises/function-prime/_codes/js/code/prime.test.js diff --git a/src/pages/exercises/function-prime/_codes/js/response/prime.jest.test.js b/src/pages/exercises/function-prime/_codes/js/response/prime.jest.test.js deleted file mode 100644 index 3114d11d..00000000 --- a/src/pages/exercises/function-prime/_codes/js/response/prime.jest.test.js +++ /dev/null @@ -1,27 +0,0 @@ -import { isPrime } from './prime.js'; - -describe('Number Tools', () => { - test('checking if the number 2 is prime', () => { - expect(isPrime(2)).toBe(true); - }); - - test('checking if the number 3 is prime', () => { - expect(isPrime(3)).toBe(true); - }); - - test('checking if the number 4 is prime', () => { - expect(isPrime(4)).toBe(false); - }); - - test('checking if the number 5 is prime', () => { - expect(isPrime(5)).toBe(true); - }); - - test('checking if the number 6 is prime', () => { - expect(isPrime(6)).toBe(false); - }); - - test('checking if the number 7 is prime', () => { - expect(isPrime(7)).toBe(true); - }); -}); diff --git a/src/pages/exercises/function-prime/_codes/js/response/prime.node.test.js b/src/pages/exercises/function-prime/_codes/js/response/prime.test.js similarity index 100% rename from src/pages/exercises/function-prime/_codes/js/response/prime.node.test.js rename to src/pages/exercises/function-prime/_codes/js/response/prime.test.js diff --git a/src/pages/exercises/function-sum/_codes/js/code/sum.jest.test.js b/src/pages/exercises/function-sum/_codes/js/code/sum.jest.test.js deleted file mode 100644 index 506e155c..00000000 --- a/src/pages/exercises/function-sum/_codes/js/code/sum.jest.test.js +++ /dev/null @@ -1,11 +0,0 @@ -import { sum } from './sum.js'; - -describe('Number Tools', () => { - test('adding 1 + 2', () => { - expect(sum(1, 2)).toBe(3); - }); - - test.skip('adding 3 + 2', () => { - expect(sum(3, 2)).toBe(5); - }); -}); diff --git a/src/pages/exercises/function-sum/_codes/js/code/sum.node.test.js b/src/pages/exercises/function-sum/_codes/js/code/sum.test.js similarity index 100% rename from src/pages/exercises/function-sum/_codes/js/code/sum.node.test.js rename to src/pages/exercises/function-sum/_codes/js/code/sum.test.js diff --git a/src/pages/exercises/function-sum/_codes/js/response/sum.jest.test.js b/src/pages/exercises/function-sum/_codes/js/response/sum.jest.test.js deleted file mode 100644 index efbb09f4..00000000 --- a/src/pages/exercises/function-sum/_codes/js/response/sum.jest.test.js +++ /dev/null @@ -1,11 +0,0 @@ -import { sum } from './sum.js'; - -describe('Number Tools', () => { - test('adding 1 + 2', () => { - expect(sum(1, 2)).toBe(3); - }); - - test('adding 3 + 2', () => { - expect(sum(3, 2)).toBe(5); - }); -}); diff --git a/src/pages/exercises/function-sum/_codes/js/response/sum.node.test.js b/src/pages/exercises/function-sum/_codes/js/response/sum.test.js similarity index 100% rename from src/pages/exercises/function-sum/_codes/js/response/sum.node.test.js rename to src/pages/exercises/function-sum/_codes/js/response/sum.test.js diff --git a/src/pages/exercises/function-triangle-checker/_codes/js/code/triangle-checker.jest.test.js b/src/pages/exercises/function-triangle-checker/_codes/js/code/triangle-checker.jest.test.js deleted file mode 100644 index a5b246ee..00000000 --- a/src/pages/exercises/function-triangle-checker/_codes/js/code/triangle-checker.jest.test.js +++ /dev/null @@ -1,28 +0,0 @@ -import { triangleChecker } from './triangle-checker.js'; - -describe('Triangle Tools', () => { - test('checking if it is equilateral', () => { - expect(triangleChecker(2, 2, 2)).toBe('equilateral'); - expect(triangleChecker(10, 10, 10)).toBe('equilateral'); - }); - - test.skip('checking if it is isosceles', () => { - expect(triangleChecker(3, 4, 4)).toBe('isosceles'); - expect(triangleChecker(4, 3, 4)).toBe('isosceles'); - expect(triangleChecker(4, 4, 3)).toBe('isosceles'); - expect(triangleChecker(10, 10, 2)).toBe('isosceles'); - }); - - test.skip('checking if it is scalene', () => { - expect(triangleChecker(3, 4, 5)).toBe('scalene'); - expect(triangleChecker(10, 11, 12)).toBe('scalene'); - expect(triangleChecker(5, 4, 2)).toBe('scalene'); - }); - - test.skip('checking if it is invalid', () => { - expect(triangleChecker(0, 0, 0)).toBe('none'); - expect(triangleChecker(3, 4, -5)).toBe('none'); - expect(triangleChecker(1, 1, 3)).toBe('none'); - expect(triangleChecker(2, 4, 2)).toBe('none'); - }); -}); diff --git a/src/pages/exercises/function-triangle-checker/_codes/js/code/triangle-checker.node.test.js b/src/pages/exercises/function-triangle-checker/_codes/js/code/triangle-checker.test.js similarity index 100% rename from src/pages/exercises/function-triangle-checker/_codes/js/code/triangle-checker.node.test.js rename to src/pages/exercises/function-triangle-checker/_codes/js/code/triangle-checker.test.js diff --git a/src/pages/exercises/function-triangle-checker/_codes/js/response/triangle-checker.jest.test.js b/src/pages/exercises/function-triangle-checker/_codes/js/response/triangle-checker.jest.test.js deleted file mode 100644 index 599410af..00000000 --- a/src/pages/exercises/function-triangle-checker/_codes/js/response/triangle-checker.jest.test.js +++ /dev/null @@ -1,28 +0,0 @@ -import { triangleChecker } from './triangle-checker.js'; - -describe('Triangle Tools', () => { - test('checking if it is equilateral', () => { - expect(triangleChecker(2, 2, 2)).toBe('equilateral'); - expect(triangleChecker(10, 10, 10)).toBe('equilateral'); - }); - - test('checking if it is isosceles', () => { - expect(triangleChecker(3, 4, 4)).toBe('isosceles'); - expect(triangleChecker(4, 3, 4)).toBe('isosceles'); - expect(triangleChecker(4, 4, 3)).toBe('isosceles'); - expect(triangleChecker(10, 10, 2)).toBe('isosceles'); - }); - - test('checking if it is scalene', () => { - expect(triangleChecker(3, 4, 5)).toBe('scalene'); - expect(triangleChecker(10, 11, 12)).toBe('scalene'); - expect(triangleChecker(5, 4, 2)).toBe('scalene'); - }); - - test('checking if it is invalid', () => { - expect(triangleChecker(0, 0, 0)).toBe('none'); - expect(triangleChecker(3, 4, -5)).toBe('none'); - expect(triangleChecker(1, 1, 3)).toBe('none'); - expect(triangleChecker(2, 4, 2)).toBe('none'); - }); -}); diff --git a/src/pages/exercises/function-triangle-checker/_codes/js/response/triangle-checker.node.test.js b/src/pages/exercises/function-triangle-checker/_codes/js/response/triangle-checker.test.js similarity index 100% rename from src/pages/exercises/function-triangle-checker/_codes/js/response/triangle-checker.node.test.js rename to src/pages/exercises/function-triangle-checker/_codes/js/response/triangle-checker.test.js diff --git a/src/pages/exercises/object-brazilian-championship/_codes/js/code/brazilian-championship.jest.test.js b/src/pages/exercises/object-brazilian-championship/_codes/js/code/brazilian-championship.jest.test.js deleted file mode 100644 index 5edac799..00000000 --- a/src/pages/exercises/object-brazilian-championship/_codes/js/code/brazilian-championship.jest.test.js +++ /dev/null @@ -1,34 +0,0 @@ -import { firstTeam, showStading } from './brazilian-championship.js'; - -const standings = undefined; // TODO - -describe('Brazilian Championship', () => { - test('Finding first team', () => { - expect(firstTeam(standings)).toBe('Palmeiras'); - }); - - test.skip('Displaying stading', () => { - expect(showStading(standings)).toBe( - `Palmeiras | 38 | 24 | 8 | 6 | 62 | 32 | 30 | 80 - Santos | 38 | 22 | 5 | 11 | 59 | 35 | 24 | 71 - Flamengo | 38 | 20 | 11 | 7 | 52 | 35 | 17 | 71 - Atlético Mineiro | 38 | 17 | 11 | 10 | 61 | 53 | 8 | 62 - Botafogo | 38 | 17 | 8 | 13 | 43 | 39 | 4 | 59 - Atlético-PR | 38 | 17 | 6 | 15 | 38 | 32 | 6 | 57 - Corinthians | 38 | 15 | 10 | 13 | 48 | 42 | 6 | 55 - Ponte Preta | 38 | 15 | 8 | 15 | 48 | 52 | -4 | 53 - Grêmio | 38 | 14 | 11 | 13 | 41 | 44 | -3 | 53 - São Paulo | 38 | 14 | 10 | 14 | 44 | 36 | 8 | 52 - Chapecoense | 38 | 13 | 13 | 12 | 49 | 56 | -7 | 52 - Cruzeiro | 38 | 14 | 9 | 15 | 48 | 49 | -1 | 51 - Fluminense | 38 | 13 | 11 | 14 | 45 | 45 | 0 | 50 - Sport Recife | 38 | 13 | 8 | 17 | 49 | 55 | -6 | 47 - Coritiba | 38 | 11 | 13 | 14 | 41 | 42 | -1 | 46 - Vitória | 38 | 12 | 9 | 17 | 51 | 53 | -2 | 45 - Internacional | 38 | 11 | 10 | 17 | 35 | 41 | -6 | 43 - Figueirense | 38 | 8 | 13 | 17 | 30 | 50 | -20 | 37 - Santa Cruz | 38 | 8 | 7 | 23 | 45 | 69 | -24 | 31 - América-MG | 38 | 7 | 7 | 24 | 23 | 58 | -35 | 28`, - ); - }); -}); diff --git a/src/pages/exercises/object-brazilian-championship/_codes/js/code/brazilian-championship.node.test.js b/src/pages/exercises/object-brazilian-championship/_codes/js/code/brazilian-championship.test.js similarity index 100% rename from src/pages/exercises/object-brazilian-championship/_codes/js/code/brazilian-championship.node.test.js rename to src/pages/exercises/object-brazilian-championship/_codes/js/code/brazilian-championship.test.js diff --git a/src/pages/exercises/object-brazilian-championship/_codes/js/response/brazilian-championship.jest.test.js b/src/pages/exercises/object-brazilian-championship/_codes/js/response/brazilian-championship.jest.test.js deleted file mode 100644 index db6796b1..00000000 --- a/src/pages/exercises/object-brazilian-championship/_codes/js/response/brazilian-championship.jest.test.js +++ /dev/null @@ -1,255 +0,0 @@ -import { firstTeam, showStading } from './brazilian-championship.js'; - -const standings = [ - { - team: 'Palmeiras', - mp: 38, - w: 24, - d: 8, - l: 6, - gf: 62, - ga: 32, - gd: 30, - pts: 80, - }, - { - team: 'Santos', - mp: 38, - w: 22, - d: 5, - l: 11, - gf: 59, - ga: 35, - gd: 24, - pts: 71, - }, - { - team: 'Flamengo', - mp: 38, - w: 20, - d: 11, - l: 7, - gf: 52, - ga: 35, - gd: 17, - pts: 71, - }, - { - team: 'Atlético Mineiro', - mp: 38, - w: 17, - d: 11, - l: 10, - gf: 61, - ga: 53, - gd: 8, - pts: 62, - }, - { - team: 'Botafogo', - mp: 38, - w: 17, - d: 8, - l: 13, - gf: 43, - ga: 39, - gd: 4, - pts: 59, - }, - { - team: 'Atlético-PR', - mp: 38, - w: 17, - d: 6, - l: 15, - gf: 38, - ga: 32, - gd: 6, - pts: 57, - }, - { - team: 'Corinthians', - mp: 38, - w: 15, - d: 10, - l: 13, - gf: 48, - ga: 42, - gd: 6, - pts: 55, - }, - { - team: 'Ponte Preta', - mp: 38, - w: 15, - d: 8, - l: 15, - gf: 48, - ga: 52, - gd: -4, - pts: 53, - }, - { - team: 'Grêmio', - mp: 38, - w: 14, - d: 11, - l: 13, - gf: 41, - ga: 44, - gd: -3, - pts: 53, - }, - { - team: 'São Paulo', - mp: 38, - w: 14, - d: 10, - l: 14, - gf: 44, - ga: 36, - gd: 8, - pts: 52, - }, - { - team: 'Chapecoense', - mp: 38, - w: 13, - d: 13, - l: 12, - gf: 49, - ga: 56, - gd: -7, - pts: 52, - }, - { - team: 'Cruzeiro', - mp: 38, - w: 14, - d: 9, - l: 15, - gf: 48, - ga: 49, - gd: -1, - pts: 51, - }, - { - team: 'Fluminense', - mp: 38, - w: 13, - d: 11, - l: 14, - gf: 45, - ga: 45, - gd: 0, - pts: 50, - }, - { - team: 'Sport Recife', - mp: 38, - w: 13, - d: 8, - l: 17, - gf: 49, - ga: 55, - gd: -6, - pts: 47, - }, - { - team: 'Coritiba', - mp: 38, - w: 11, - d: 13, - l: 14, - gf: 41, - ga: 42, - gd: -1, - pts: 46, - }, - { - team: 'Vitória', - mp: 38, - w: 12, - d: 9, - l: 17, - gf: 51, - ga: 53, - gd: -2, - pts: 45, - }, - { - team: 'Internacional', - mp: 38, - w: 11, - d: 10, - l: 17, - gf: 35, - ga: 41, - gd: -6, - pts: 43, - }, - { - team: 'Figueirense', - mp: 38, - w: 8, - d: 13, - l: 17, - gf: 30, - ga: 50, - gd: -20, - pts: 37, - }, - { - team: 'Santa Cruz', - mp: 38, - w: 8, - d: 7, - l: 23, - gf: 45, - ga: 69, - gd: -24, - pts: 31, - }, - { - team: 'América-MG', - mp: 38, - w: 7, - d: 7, - l: 24, - gf: 23, - ga: 58, - gd: -35, - pts: 28, - }, -]; - -describe('Brazilian Championship', () => { - test('Finding first team', () => { - expect(firstTeam(standings)).toBe('Palmeiras'); - }); - - test('Displaying stading', () => { - expect(showStading(standings)).toBe( - `Palmeiras | 38 | 24 | 8 | 6 | 62 | 32 | 30 | 80 -Santos | 38 | 22 | 5 | 11 | 59 | 35 | 24 | 71 -Flamengo | 38 | 20 | 11 | 7 | 52 | 35 | 17 | 71 -Atlético Mineiro | 38 | 17 | 11 | 10 | 61 | 53 | 8 | 62 -Botafogo | 38 | 17 | 8 | 13 | 43 | 39 | 4 | 59 -Atlético-PR | 38 | 17 | 6 | 15 | 38 | 32 | 6 | 57 -Corinthians | 38 | 15 | 10 | 13 | 48 | 42 | 6 | 55 -Ponte Preta | 38 | 15 | 8 | 15 | 48 | 52 | -4 | 53 -Grêmio | 38 | 14 | 11 | 13 | 41 | 44 | -3 | 53 -São Paulo | 38 | 14 | 10 | 14 | 44 | 36 | 8 | 52 -Chapecoense | 38 | 13 | 13 | 12 | 49 | 56 | -7 | 52 -Cruzeiro | 38 | 14 | 9 | 15 | 48 | 49 | -1 | 51 -Fluminense | 38 | 13 | 11 | 14 | 45 | 45 | 0 | 50 -Sport Recife | 38 | 13 | 8 | 17 | 49 | 55 | -6 | 47 -Coritiba | 38 | 11 | 13 | 14 | 41 | 42 | -1 | 46 -Vitória | 38 | 12 | 9 | 17 | 51 | 53 | -2 | 45 -Internacional | 38 | 11 | 10 | 17 | 35 | 41 | -6 | 43 -Figueirense | 38 | 8 | 13 | 17 | 30 | 50 | -20 | 37 -Santa Cruz | 38 | 8 | 7 | 23 | 45 | 69 | -24 | 31 -América-MG | 38 | 7 | 7 | 24 | 23 | 58 | -35 | 28`, - ); - }); -}); diff --git a/src/pages/exercises/object-brazilian-championship/_codes/js/response/brazilian-championship.node.test.js b/src/pages/exercises/object-brazilian-championship/_codes/js/response/brazilian-championship.test.js similarity index 100% rename from src/pages/exercises/object-brazilian-championship/_codes/js/response/brazilian-championship.node.test.js rename to src/pages/exercises/object-brazilian-championship/_codes/js/response/brazilian-championship.test.js diff --git a/src/pages/exercises/object-cep/_codes/js/code/cep.jest.test.js b/src/pages/exercises/object-cep/_codes/js/code/cep.jest.test.js deleted file mode 100644 index 43da99b3..00000000 --- a/src/pages/exercises/object-cep/_codes/js/code/cep.jest.test.js +++ /dev/null @@ -1,30 +0,0 @@ -import { getInfo } from './cep.js'; - -describe('CEP Util', () => { - test('displaying cep information', () => { - let expected = `cep: 01001-000, -logradouro: Praça da Sé, -complemento: lado ímpar, -bairro: Sé, -localidade: São Paulo, -uf: SP, -unidade: , -ibge: 3550308, -gia: 1004`; - - // https://viacep.com.br/ws/01001000/json/ - let cep = { - cep: '01001-000', - logradouro: 'Praça da Sé', - complemento: 'lado ímpar', - bairro: 'Sé', - localidade: 'São Paulo', - uf: 'SP', - unidade: '', - ibge: '3550308', - gia: '1004', - }; - - expect(getInfo(cep)).toBe(expected); - }); -}); diff --git a/src/pages/exercises/object-cep/_codes/js/code/cep.node.test.js b/src/pages/exercises/object-cep/_codes/js/code/cep.test.js similarity index 100% rename from src/pages/exercises/object-cep/_codes/js/code/cep.node.test.js rename to src/pages/exercises/object-cep/_codes/js/code/cep.test.js diff --git a/src/pages/exercises/object-cep/_codes/js/response/cep.jest.test.js b/src/pages/exercises/object-cep/_codes/js/response/cep.jest.test.js deleted file mode 100644 index 43da99b3..00000000 --- a/src/pages/exercises/object-cep/_codes/js/response/cep.jest.test.js +++ /dev/null @@ -1,30 +0,0 @@ -import { getInfo } from './cep.js'; - -describe('CEP Util', () => { - test('displaying cep information', () => { - let expected = `cep: 01001-000, -logradouro: Praça da Sé, -complemento: lado ímpar, -bairro: Sé, -localidade: São Paulo, -uf: SP, -unidade: , -ibge: 3550308, -gia: 1004`; - - // https://viacep.com.br/ws/01001000/json/ - let cep = { - cep: '01001-000', - logradouro: 'Praça da Sé', - complemento: 'lado ímpar', - bairro: 'Sé', - localidade: 'São Paulo', - uf: 'SP', - unidade: '', - ibge: '3550308', - gia: '1004', - }; - - expect(getInfo(cep)).toBe(expected); - }); -}); diff --git a/src/pages/exercises/object-cep/_codes/js/response/cep.node.test.js b/src/pages/exercises/object-cep/_codes/js/response/cep.test.js similarity index 100% rename from src/pages/exercises/object-cep/_codes/js/response/cep.node.test.js rename to src/pages/exercises/object-cep/_codes/js/response/cep.test.js diff --git a/src/pages/exercises/object-comics/_codes/js/code/comics.jest.test.js b/src/pages/exercises/object-comics/_codes/js/code/comics.jest.test.js deleted file mode 100644 index 5ddd6b12..00000000 --- a/src/pages/exercises/object-comics/_codes/js/code/comics.jest.test.js +++ /dev/null @@ -1,67 +0,0 @@ -import { namesByComics, topWeightNames, weight } from './comics.js'; - -const characters = [ - { - comics: 'Marvel', - height: 1.78, - link: [ - 'http://marvel.com/characters/54/spider-man', - 'http://marvel.com/universe/Spider-Man_(Peter_Parker)', - ], - name: 'Spider-Man', - realName: 'Peter Benjamin Parker', - weight: 76, - }, - { - comics: 'Marvel', - height: 2.44, - link: [ - 'http://marvel.com/characters/25/hulk', - 'http://marvel.com/universe/Hulk_(Bruce_Banner)', - ], - name: 'Hulk', - realName: 'Robert Bruce Banner', - weight: 635, - }, - { - comics: 'DC', - height: 1.91, - link: [ - 'http://www.dccomics.com/characters/superman', - 'http://dc.wikia.com/wiki/Superman_(Clark_Kent)', - ], - name: 'Superman', - realName: 'Clark Joseph Kent', - weight: 107, - }, - { - comics: 'DC', - height: 1.88, - link: [ - 'http://www.dccomics.com/characters/batman', - 'http://dc.wikia.com/wiki/Bruce_Wayne_(New_Earth)', - ], - name: 'batman', - realName: 'Bruce Wayne', - weight: 95, - }, - // TODO bad guys, villain -]; - -describe('Comics Tool', () => { - test('listing names by DC comics', () => { - expect(namesByComics(characters, 'DC')).toEqual(['batman', 'Superman']); - }); - - test.skip('sorting top weight by Marvel comics', () => { - expect(topWeightNames(characters, 'Marvel')).toEqual(['Hulk', 'Spider-Man']); - }); - - test.skip('sorting top weight', () => { - expect(topWeightNames(characters)).toEqual(['Hulk', 'Superman', 'batman', 'Spider-Man']); - }); - - test.skip('weighing by DC comics', () => { - expect(weight(characters, 'DC')).toBe(101); - }); -}); diff --git a/src/pages/exercises/object-comics/_codes/js/code/comics.node.test.js b/src/pages/exercises/object-comics/_codes/js/code/comics.test.js similarity index 100% rename from src/pages/exercises/object-comics/_codes/js/code/comics.node.test.js rename to src/pages/exercises/object-comics/_codes/js/code/comics.test.js diff --git a/src/pages/exercises/object-comics/_codes/js/response/comics.jest.test.js b/src/pages/exercises/object-comics/_codes/js/response/comics.jest.test.js deleted file mode 100644 index 2f52026d..00000000 --- a/src/pages/exercises/object-comics/_codes/js/response/comics.jest.test.js +++ /dev/null @@ -1,67 +0,0 @@ -import { namesByComics, topWeightNames, weight } from './comics.js'; - -const characters = [ - { - comics: 'Marvel', - height: 1.78, - link: [ - 'http://marvel.com/characters/54/spider-man', - 'http://marvel.com/universe/Spider-Man_(Peter_Parker)', - ], - name: 'Spider-Man', - realName: 'Peter Benjamin Parker', - weight: 76, - }, - { - comics: 'Marvel', - height: 2.44, - link: [ - 'http://marvel.com/characters/25/hulk', - 'http://marvel.com/universe/Hulk_(Bruce_Banner)', - ], - name: 'Hulk', - realName: 'Robert Bruce Banner', - weight: 635, - }, - { - comics: 'DC', - height: 1.91, - link: [ - 'http://www.dccomics.com/characters/superman', - 'http://dc.wikia.com/wiki/Superman_(Clark_Kent)', - ], - name: 'Superman', - realName: 'Clark Joseph Kent', - weight: 107, - }, - { - comics: 'DC', - height: 1.88, - link: [ - 'http://www.dccomics.com/characters/batman', - 'http://dc.wikia.com/wiki/Bruce_Wayne_(New_Earth)', - ], - name: 'batman', - realName: 'Bruce Wayne', - weight: 95, - }, - // TODO bad guys, villain -]; - -describe('Comics Tool', () => { - test('listing names by DC comics', () => { - expect(namesByComics(characters, 'DC')).toEqual(['batman', 'Superman']); - }); - - test('sorting top weight by Marvel comics', () => { - expect(topWeightNames(characters, 'Marvel')).toEqual(['Hulk', 'Spider-Man']); - }); - - test('sorting top weight', () => { - expect(topWeightNames(characters)).toEqual(['Hulk', 'Superman', 'batman', 'Spider-Man']); - }); - - test('weighing by DC comics', () => { - expect(weight(characters, 'DC')).toBe(101); - }); -}); diff --git a/src/pages/exercises/object-comics/_codes/js/response/comics.node.test.js b/src/pages/exercises/object-comics/_codes/js/response/comics.test.js similarity index 100% rename from src/pages/exercises/object-comics/_codes/js/response/comics.node.test.js rename to src/pages/exercises/object-comics/_codes/js/response/comics.test.js diff --git a/src/pages/exercises/object-exam/_codes/js/code/exam.jest.test.js b/src/pages/exercises/object-exam/_codes/js/code/exam.jest.test.js deleted file mode 100644 index 3c270b35..00000000 --- a/src/pages/exercises/object-exam/_codes/js/code/exam.jest.test.js +++ /dev/null @@ -1,40 +0,0 @@ -import { Exam } from './exam-stats.js'; - -describe('Exam Tool', () => { - test('calculating grade by weighted average', () => { - let weight = { q1: 2, q2: 2, q3: 2, q4: 2, q5: 2 }; - let answer = { q1: 'a', q2: 'b', q3: 'a', q4: 'c', q5: 'd' }; - let examCheck = new ExamCheck(answer, weight); - - let student = { q1: 'a', q2: 'b', q3: 'b', q4: 'b', q5: 'b' }; - expect(examCheck.grade(student)).toBe(4); - }); - - test.skip('calculating grade by weighted average', () => { - let weight = { q1: 2, q2: 2, q3: 2, q4: 2, q5: 2 }; - let answer = { q1: 'a', q2: 'b', q3: 'a', q4: 'c', q5: 'd' }; - let examCheck = new ExamCheck(answer, weight); - - let student = { q1: 'c', q2: 'b', q3: 'a', q4: 'c', q5: 'd' }; - expect(examCheck.grade(student)).toBe(8); - }); - - test.skip('calculating exam values', () => { - let exam = new Exam([ - { student: 'Fulano', grade: 10 }, - { student: 'Sicrano', grade: 5 }, - { student: 'Beltrano', grade: 7 }, - ]); - - expect(exam.avg()).toBe(7.333333333333333); - - expect(exam.min()).toEqual([5]); - expect(exam.min(2)).toEqual([5, 7]); - - expect(exam.max()).toEqual([10]); - - expect(exam.lt(6)).toEqual([5]); - - expect(exam.gt(6)).toEqual([7, 10]); - }); -}); diff --git a/src/pages/exercises/object-exam/_codes/js/code/exam.node.test.js b/src/pages/exercises/object-exam/_codes/js/code/exam.test.js similarity index 100% rename from src/pages/exercises/object-exam/_codes/js/code/exam.node.test.js rename to src/pages/exercises/object-exam/_codes/js/code/exam.test.js diff --git a/src/pages/exercises/object-exam/_codes/js/response/exam.jest.test.js b/src/pages/exercises/object-exam/_codes/js/response/exam.jest.test.js deleted file mode 100644 index 343e045b..00000000 --- a/src/pages/exercises/object-exam/_codes/js/response/exam.jest.test.js +++ /dev/null @@ -1,45 +0,0 @@ -import { Exam } from './exam.js'; - -describe('Exam Tool', () => { - let exam; - - beforeEach(() => { - const weight = { q1: 2, q2: 2, q3: 2, q4: 2, q5: 2 }; - const answer = { q1: 'a', q2: 'b', q3: 'a', q4: 'c', q5: 'd' }; - exam = new Exam(answer, weight); - }); - - test('calculating exam values', () => { - exam.add({ - student: 'Alice', - answer: { q1: 'a', q2: 'b', q3: 'b', q4: 'b', q5: 'b' }, - }); - - expect(examStats.avg()).toBe(4); - - expect(examStats.min()).toEqual([4]); - - expect(examStats.max()).toEqual([4]); - - expect(examStats.lt(7)).toEqual([4]); - - expect(examStats.gt(7)).toEqual([]); - }); - - test('calculating exam values', () => { - exam.add({ - student: 'Bob', - answer: { q1: 'c', q2: 'b', q3: 'a', q4: 'c', q5: 'd' }, - }); - - expect(examStats.avg()).toBe(6); - - expect(examStats.min()).toEqual([4]); - - expect(examStats.max()).toEqual([8]); - - expect(examStats.lt(7)).toEqual([4]); - - expect(examStats.gt(7)).toEqual([8]); - }); -}); diff --git a/src/pages/exercises/object-exam/_codes/js/response/exam.node.test.js b/src/pages/exercises/object-exam/_codes/js/response/exam.test.js similarity index 100% rename from src/pages/exercises/object-exam/_codes/js/response/exam.node.test.js rename to src/pages/exercises/object-exam/_codes/js/response/exam.test.js diff --git a/src/pages/exercises/string-cipher/_codes/js/code/cipher.jest.test.js b/src/pages/exercises/string-cipher/_codes/js/code/cipher.jest.test.js deleted file mode 100644 index 095f6b76..00000000 --- a/src/pages/exercises/string-cipher/_codes/js/code/cipher.jest.test.js +++ /dev/null @@ -1,13 +0,0 @@ -import { rot } from './cipher.js'; - -describe('Caesar Cipher', () => { - test('encoding rot2', () => { - expect(rot('abc', 2)).toBe('cde'); - expect(rot('xyz', 2)).toBe('zab'); - }); - - test.skip('encoding rot13', () => { - expect(rot('abc', 13)).toBe('nop'); - expect(rot('xyz', 13)).toBe('klm'); - }); -}); diff --git a/src/pages/exercises/string-cipher/_codes/js/code/cipher.node.test.js b/src/pages/exercises/string-cipher/_codes/js/code/cipher.test.js similarity index 100% rename from src/pages/exercises/string-cipher/_codes/js/code/cipher.node.test.js rename to src/pages/exercises/string-cipher/_codes/js/code/cipher.test.js diff --git a/src/pages/exercises/string-cipher/_codes/js/response/cipher.jest.test.js b/src/pages/exercises/string-cipher/_codes/js/response/cipher.jest.test.js deleted file mode 100644 index e6cfb9a6..00000000 --- a/src/pages/exercises/string-cipher/_codes/js/response/cipher.jest.test.js +++ /dev/null @@ -1,13 +0,0 @@ -import { rot } from './cipher.js'; - -describe('Caesar Cipher', () => { - test('encoding rot2', () => { - expect(rot('abc', 2)).toBe('cde'); - expect(rot('xyz', 2)).toBe('zab'); - }); - - test('encoding rot13', () => { - expect(rot('abc', 13)).toBe('nop'); - expect(rot('xyz', 13)).toBe('klm'); - }); -}); diff --git a/src/pages/exercises/string-cipher/_codes/js/response/cipher.node.test.js b/src/pages/exercises/string-cipher/_codes/js/response/cipher.test.js similarity index 100% rename from src/pages/exercises/string-cipher/_codes/js/response/cipher.node.test.js rename to src/pages/exercises/string-cipher/_codes/js/response/cipher.test.js diff --git a/src/pages/exercises/string-citation/_codes/js/code/citation.jest.test.js b/src/pages/exercises/string-citation/_codes/js/code/citation.jest.test.js deleted file mode 100644 index 4387d183..00000000 --- a/src/pages/exercises/string-citation/_codes/js/code/citation.jest.test.js +++ /dev/null @@ -1,13 +0,0 @@ -import { citation, compactCitation } from './citation.js'; - -describe('Citation Name', () => { - test('formatting case citation', () => { - let person = 'Luiz Carlos Rodrigues Chaves'; - expect(citation(person)).toBe('CHAVES; Luiz Carlos Rodrigues'); - }); - - test.skip('formatting short form case citation', () => { - let person = 'Luiz Carlos Rodrigues Chaves'; - expect(compactCitation(person)).toBe('CHAVES; L. C. R.'); - }); -}); diff --git a/src/pages/exercises/string-citation/_codes/js/code/citation.node.test.js b/src/pages/exercises/string-citation/_codes/js/code/citation.test.js similarity index 100% rename from src/pages/exercises/string-citation/_codes/js/code/citation.node.test.js rename to src/pages/exercises/string-citation/_codes/js/code/citation.test.js diff --git a/src/pages/exercises/string-citation/_codes/js/response/citation.jest.test.js b/src/pages/exercises/string-citation/_codes/js/response/citation.jest.test.js deleted file mode 100644 index 42262101..00000000 --- a/src/pages/exercises/string-citation/_codes/js/response/citation.jest.test.js +++ /dev/null @@ -1,13 +0,0 @@ -import { citation, compactCitation } from './citation.js'; - -describe('Citation Name', () => { - test('formatting case citation', () => { - let person = 'Luiz Carlos Rodrigues Chaves'; - expect(citation(person)).toBe('CHAVES; Luiz Carlos Rodrigues'); - }); - - test('formatting short form case citation', () => { - let person = 'Luiz Carlos Rodrigues Chaves'; - expect(compactCitation(person)).toBe('CHAVES; L. C. R.'); - }); -}); diff --git a/src/pages/exercises/string-citation/_codes/js/response/citation.node.test.js b/src/pages/exercises/string-citation/_codes/js/response/citation.test.js similarity index 100% rename from src/pages/exercises/string-citation/_codes/js/response/citation.node.test.js rename to src/pages/exercises/string-citation/_codes/js/response/citation.test.js diff --git a/src/pages/exercises/string-generating-cpf/_codes/js/code/generating-cpf.jest.test.js b/src/pages/exercises/string-generating-cpf/_codes/js/code/generating-cpf.jest.test.js deleted file mode 100644 index 12274dfb..00000000 --- a/src/pages/exercises/string-generating-cpf/_codes/js/code/generating-cpf.jest.test.js +++ /dev/null @@ -1,15 +0,0 @@ -import { cpfCheckDigit } from './generating-cpf.js'; - -describe('Generating CPF Check Digit', () => { - test('invalid cpf', () => { - expect(cpfCheckDigit('000000000')).toBe(false); - }); - - test.skip('the check digit of 123456789 is 09', () => { - expect(cpfCheckDigit('123456789')).toBe('12345678909'); - }); - - test.skip('the check digit of 000111222 is 85', () => { - expect(cpfCheckDigit('000111222')).toBe('00011122285'); - }); -}); diff --git a/src/pages/exercises/string-generating-cpf/_codes/js/code/generating-cpf.node.test.js b/src/pages/exercises/string-generating-cpf/_codes/js/code/generating-cpf.test.js similarity index 100% rename from src/pages/exercises/string-generating-cpf/_codes/js/code/generating-cpf.node.test.js rename to src/pages/exercises/string-generating-cpf/_codes/js/code/generating-cpf.test.js diff --git a/src/pages/exercises/string-generating-cpf/_codes/js/response/generating-cpf.jest.test.js b/src/pages/exercises/string-generating-cpf/_codes/js/response/generating-cpf.jest.test.js deleted file mode 100644 index 59201e39..00000000 --- a/src/pages/exercises/string-generating-cpf/_codes/js/response/generating-cpf.jest.test.js +++ /dev/null @@ -1,15 +0,0 @@ -import { cpfCheckDigit } from './generating-cpf.js'; - -describe('Generating CPF Check Digit', () => { - test('invalid cpf', () => { - expect(cpfCheckDigit('000000000')).toBe(false); - }); - - test('the check digit of 123456789 is 09', () => { - expect(cpfCheckDigit('123456789')).toBe('12345678909'); - }); - - test('the check digit of 000111222 is 85', () => { - expect(cpfCheckDigit('000111222')).toBe('00011122285'); - }); -}); diff --git a/src/pages/exercises/string-generating-cpf/_codes/js/response/generating-cpf.node.test.js b/src/pages/exercises/string-generating-cpf/_codes/js/response/generating-cpf.test.js similarity index 100% rename from src/pages/exercises/string-generating-cpf/_codes/js/response/generating-cpf.node.test.js rename to src/pages/exercises/string-generating-cpf/_codes/js/response/generating-cpf.test.js diff --git a/src/pages/exercises/string-hamming/_codes/js/code/hamming.jest.test.js b/src/pages/exercises/string-hamming/_codes/js/code/hamming.jest.test.js deleted file mode 100644 index aa0b8642..00000000 --- a/src/pages/exercises/string-hamming/_codes/js/code/hamming.jest.test.js +++ /dev/null @@ -1,15 +0,0 @@ -import { hamming } from './hamming.js'; - -describe('Hamming distance', () => { - test('comparing the GGACG to GGTCG', () => { - let dna1 = 'GGACG'; - let dna2 = 'GGTCG'; - expect(hamming(dna1, dna2)).toBe(1); - }); - - test.skip('comparing the GGACGGATTCTG to AGGACGGATTCT', () => { - let dna1 = 'GGACGGATTCTG'; - let dna2 = 'AGGACGGATTCT'; - expect(hamming(dna1, dna2)).toBe(9); - }); -}); diff --git a/src/pages/exercises/string-hamming/_codes/js/code/hamming.node.test.js b/src/pages/exercises/string-hamming/_codes/js/code/hamming.test.js similarity index 100% rename from src/pages/exercises/string-hamming/_codes/js/code/hamming.node.test.js rename to src/pages/exercises/string-hamming/_codes/js/code/hamming.test.js diff --git a/src/pages/exercises/string-hamming/_codes/js/response/hamming.jest.test.js b/src/pages/exercises/string-hamming/_codes/js/response/hamming.jest.test.js deleted file mode 100644 index 937efdeb..00000000 --- a/src/pages/exercises/string-hamming/_codes/js/response/hamming.jest.test.js +++ /dev/null @@ -1,15 +0,0 @@ -import { hamming } from './hamming.js'; - -describe('Hamming distance', () => { - test('comparing the GGACG to GGTCG', () => { - let dna1 = 'GGACG'; - let dna2 = 'GGTCG'; - expect(hamming(dna1, dna2)).toBe(1); - }); - - test('comparing the GGACGGATTCTG to AGGACGGATTCT', () => { - let dna1 = 'GGACGGATTCTG'; - let dna2 = 'AGGACGGATTCT'; - expect(hamming(dna1, dna2)).toBe(9); - }); -}); diff --git a/src/pages/exercises/string-hamming/_codes/js/response/hamming.node.test.js b/src/pages/exercises/string-hamming/_codes/js/response/hamming.test.js similarity index 100% rename from src/pages/exercises/string-hamming/_codes/js/response/hamming.node.test.js rename to src/pages/exercises/string-hamming/_codes/js/response/hamming.test.js diff --git a/src/pages/exercises/string-ip-to-number/_codes/js/code/ip.jest.test.js b/src/pages/exercises/string-ip-to-number/_codes/js/code/ip.jest.test.js deleted file mode 100644 index 2bc65acf..00000000 --- a/src/pages/exercises/string-ip-to-number/_codes/js/code/ip.jest.test.js +++ /dev/null @@ -1,19 +0,0 @@ -import { ip2decimal, decimal2ip } from './ip.js'; - -describe('IP Util', () => { - test('converting ip 192.168.0.1 to number', () => { - expect(ip2decimal('192.168.0.1')).toBe(3232235521); - }); - - test.skip('converting ip 192.168.0.2 to number', () => { - expect(ip2decimal('192.168.0.2')).toBe(3232235522); - }); - - test.skip('converting number 3232235521 to ip', () => { - expect(decimal2ip(3232235521)).toBe('192.168.0.1'); - }); - - test.skip('converting number 3232235522 to ip', () => { - expect(decimal2ip(3232235522)).toBe('192.168.0.2'); - }); -}); diff --git a/src/pages/exercises/string-ip-to-number/_codes/js/code/ip.node.test.js b/src/pages/exercises/string-ip-to-number/_codes/js/code/ip.test.js similarity index 100% rename from src/pages/exercises/string-ip-to-number/_codes/js/code/ip.node.test.js rename to src/pages/exercises/string-ip-to-number/_codes/js/code/ip.test.js diff --git a/src/pages/exercises/string-ip-to-number/_codes/js/response/ip.jest.test.js b/src/pages/exercises/string-ip-to-number/_codes/js/response/ip.jest.test.js deleted file mode 100644 index ba6a3790..00000000 --- a/src/pages/exercises/string-ip-to-number/_codes/js/response/ip.jest.test.js +++ /dev/null @@ -1,19 +0,0 @@ -import { ip2decimal, decimal2ip } from './ip.js'; - -describe('IP Util', () => { - test('converting ip 192.168.0.1 to number', () => { - expect(ip2decimal('192.168.0.1')).toBe(3232235521); - }); - - test('converting ip 192.168.0.2 to number', () => { - expect(ip2decimal('192.168.0.2')).toBe(3232235522); - }); - - test('converting number 3232235521 to ip', () => { - expect(decimal2ip(3232235521)).toBe('192.168.0.1'); - }); - - test('converting number 3232235522 to ip', () => { - expect(decimal2ip(3232235522)).toBe('192.168.0.2'); - }); -}); diff --git a/src/pages/exercises/string-ip-to-number/_codes/js/response/ip.node.test.js b/src/pages/exercises/string-ip-to-number/_codes/js/response/ip.test.js similarity index 100% rename from src/pages/exercises/string-ip-to-number/_codes/js/response/ip.node.test.js rename to src/pages/exercises/string-ip-to-number/_codes/js/response/ip.test.js diff --git a/src/pages/exercises/string-list-generator/_codes/js/code/list-generator.jest.test.js b/src/pages/exercises/string-list-generator/_codes/js/code/list-generator.jest.test.js deleted file mode 100644 index 94d1ad2e..00000000 --- a/src/pages/exercises/string-list-generator/_codes/js/code/list-generator.jest.test.js +++ /dev/null @@ -1,25 +0,0 @@ -import { createList } from './list-generator.js'; - -describe('List Generator', () => { - test('making list', () => { - let expected = ``; - - expect(createList(3)).toBe(expected); - }); - - test.skip('making list', () => { - let expected = ``; - - expect(createList(5, 'Item')).toBe(expected); - }); -}); diff --git a/src/pages/exercises/string-list-generator/_codes/js/code/list-generator.node.test.js b/src/pages/exercises/string-list-generator/_codes/js/code/list-generator.test.js similarity index 100% rename from src/pages/exercises/string-list-generator/_codes/js/code/list-generator.node.test.js rename to src/pages/exercises/string-list-generator/_codes/js/code/list-generator.test.js diff --git a/src/pages/exercises/string-list-generator/_codes/js/response/list-generator.jest.test.js b/src/pages/exercises/string-list-generator/_codes/js/response/list-generator.jest.test.js deleted file mode 100644 index c58de846..00000000 --- a/src/pages/exercises/string-list-generator/_codes/js/response/list-generator.jest.test.js +++ /dev/null @@ -1,25 +0,0 @@ -import { createList } from './list-generator.js'; - -describe('List Generator', () => { - test('making list', () => { - let expected = ``; - - expect(createList(3)).toBe(expected); - }); - - test('making list', () => { - let expected = ``; - - expect(createList(5, 'Item')).toBe(expected); - }); -}); diff --git a/src/pages/exercises/string-list-generator/_codes/js/response/list-generator.node.test.js b/src/pages/exercises/string-list-generator/_codes/js/response/list-generator.test.js similarity index 100% rename from src/pages/exercises/string-list-generator/_codes/js/response/list-generator.node.test.js rename to src/pages/exercises/string-list-generator/_codes/js/response/list-generator.test.js diff --git a/src/pages/exercises/string-lorem-ipsum-generator/_codes/js/code/lorem-ipsum-generator.jest.test.js b/src/pages/exercises/string-lorem-ipsum-generator/_codes/js/code/lorem-ipsum-generator.jest.test.js deleted file mode 100644 index 77abe5fe..00000000 --- a/src/pages/exercises/string-lorem-ipsum-generator/_codes/js/code/lorem-ipsum-generator.jest.test.js +++ /dev/null @@ -1,27 +0,0 @@ -import { word, paragraph } from './lorem-ipsum-generator.js'; - -describe('Lorem Ipsum', () => { - test('generating the first 3 words', () => { - expect(word(3)).toBe('Lorem ipsum dolor'); - }); - - test.skip('generating the first 8 words', () => { - expect(word(8)).toBe('Lorem ipsum dolor sit amet, consectetur adipiscing elit.'); - }); - - test.skip('generating the first 3 paragraphs', () => { - let expected = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam scelerisque diam gravida justo volutpat blandit. Nullam consectetur eu sem in posuere. Integer varius nisi risus, eu congue magna feugiat quis. Duis lectus diam, bibendum ut aliquam sit amet, pellentesque porttitor metus. Integer vel dictum nunc. Nulla pretium, ante sit amet condimentum tempus, nulla urna vestibulum nisi, ut vulputate felis ligula vitae libero. Nulla ut massa consequat, vulputate sem eu, egestas turpis. Aenean id pulvinar felis, in efficitur eros. Phasellus a est et sapien faucibus suscipit sit amet at eros. -Donec eu quam placerat, efficitur sem et, pretium sem. Mauris pretium nibh mi, a convallis lacus pellentesque et. Mauris ultrices sodales tortor, non posuere leo pulvinar ac. Suspendisse potenti. Praesent pharetra congue dolor, eu blandit eros dictum ut. Fusce urna leo, tempus id sagittis sed, porta quis turpis. Mauris varius, nisi sed ornare semper, mauris tortor condimentum erat, id imperdiet nunc neque ut ipsum. Cras eu tincidunt diam, eget sollicitudin tellus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nunc id leo dapibus, condimentum lectus sed, imperdiet libero. Integer convallis ornare sapien in semper. Suspendisse eget lacus sodales, viverra dolor id, rutrum tellus. Mauris consequat sagittis tincidunt. -Proin velit leo, elementum vitae varius vitae, volutpat vehicula nibh. Etiam vel dui arcu. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nullam at finibus erat. Aliquam et risus viverra nulla elementum sodales. Etiam bibendum lacus ac dolor fermentum elementum. Etiam aliquam fringilla elit sed condimentum. Sed molestie aliquet aliquam. Pellentesque porta neque ac massa pharetra, vitae porta nibh finibus. Praesent nec auctor sem, non aliquam lorem. Integer maximus sed quam nec malesuada. Quisque quis molestie orci. Nullam venenatis dolor non tincidunt egestas. Aliquam dignissim sed sapien in auctor. Praesent rhoncus sem ut accumsan vestibulum. Vestibulum bibendum egestas semper.`; - expect(paragraph(3)).toBe(expected); - }); - - test.skip('generating the first 5 paragraphs', () => { - let expected = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam scelerisque diam gravida justo volutpat blandit. Nullam consectetur eu sem in posuere. Integer varius nisi risus, eu congue magna feugiat quis. Duis lectus diam, bibendum ut aliquam sit amet, pellentesque porttitor metus. Integer vel dictum nunc. Nulla pretium, ante sit amet condimentum tempus, nulla urna vestibulum nisi, ut vulputate felis ligula vitae libero. Nulla ut massa consequat, vulputate sem eu, egestas turpis. Aenean id pulvinar felis, in efficitur eros. Phasellus a est et sapien faucibus suscipit sit amet at eros. -Donec eu quam placerat, efficitur sem et, pretium sem. Mauris pretium nibh mi, a convallis lacus pellentesque et. Mauris ultrices sodales tortor, non posuere leo pulvinar ac. Suspendisse potenti. Praesent pharetra congue dolor, eu blandit eros dictum ut. Fusce urna leo, tempus id sagittis sed, porta quis turpis. Mauris varius, nisi sed ornare semper, mauris tortor condimentum erat, id imperdiet nunc neque ut ipsum. Cras eu tincidunt diam, eget sollicitudin tellus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nunc id leo dapibus, condimentum lectus sed, imperdiet libero. Integer convallis ornare sapien in semper. Suspendisse eget lacus sodales, viverra dolor id, rutrum tellus. Mauris consequat sagittis tincidunt. -Proin velit leo, elementum vitae varius vitae, volutpat vehicula nibh. Etiam vel dui arcu. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nullam at finibus erat. Aliquam et risus viverra nulla elementum sodales. Etiam bibendum lacus ac dolor fermentum elementum. Etiam aliquam fringilla elit sed condimentum. Sed molestie aliquet aliquam. Pellentesque porta neque ac massa pharetra, vitae porta nibh finibus. Praesent nec auctor sem, non aliquam lorem. Integer maximus sed quam nec malesuada. Quisque quis molestie orci. Nullam venenatis dolor non tincidunt egestas. Aliquam dignissim sed sapien in auctor. Praesent rhoncus sem ut accumsan vestibulum. Vestibulum bibendum egestas semper. -Integer nec odio tincidunt, hendrerit justo vel, molestie metus. Donec placerat felis ac condimentum mattis. Sed et massa ac eros pulvinar vulputate. Fusce vitae dictum turpis. Curabitur tellus magna, pharetra non bibendum sed, sagittis luctus nibh. Sed sit amet sodales justo. Ut congue tortor nec augue ultricies aliquet. Suspendisse potenti. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Etiam eget metus ligula. Donec posuere ante eget arcu mattis, in egestas mauris scelerisque. Nam lacus lorem, convallis sit amet semper id, pretium vel quam. Cras rhoncus volutpat nibh eu fermentum. Donec faucibus posuere nunc congue laoreet. Nunc mi magna, viverra posuere accumsan id, maximus nec nunc. -Aenean porttitor tellus quis enim dapibus, ut luctus est elementum. Donec dignissim tellus eu ligula accumsan, quis rutrum enim lacinia. Fusce tempus leo et tempor tempor. Vestibulum rutrum diam sem, ut mattis lectus eleifend in. Morbi a placerat diam. Nulla vel mauris ut sem venenatis interdum. Nullam tempus rutrum nibh, et viverra velit molestie ut. Proin vehicula, tortor in efficitur faucibus, turpis ante pulvinar lacus, eu ullamcorper diam velit non felis. Vivamus tristique lobortis diam at tempor.`; - expect(paragraph(5)).toBe(expected); - }); -}); diff --git a/src/pages/exercises/string-lorem-ipsum-generator/_codes/js/code/lorem-ipsum-generator.node.test.js b/src/pages/exercises/string-lorem-ipsum-generator/_codes/js/code/lorem-ipsum-generator.test.js similarity index 100% rename from src/pages/exercises/string-lorem-ipsum-generator/_codes/js/code/lorem-ipsum-generator.node.test.js rename to src/pages/exercises/string-lorem-ipsum-generator/_codes/js/code/lorem-ipsum-generator.test.js diff --git a/src/pages/exercises/string-lorem-ipsum-generator/_codes/js/response/lorem-ipsum-generator.jest.test.js b/src/pages/exercises/string-lorem-ipsum-generator/_codes/js/response/lorem-ipsum-generator.jest.test.js deleted file mode 100644 index b7199cee..00000000 --- a/src/pages/exercises/string-lorem-ipsum-generator/_codes/js/response/lorem-ipsum-generator.jest.test.js +++ /dev/null @@ -1,27 +0,0 @@ -import { word, paragraph } from './lorem-ipsum-generator.js'; - -describe('Lorem Ipsum', () => { - test('generating the first 3 words', () => { - expect(word(3)).toBe('Lorem ipsum dolor'); - }); - - test('generating the first 8 words', () => { - expect(word(8)).toBe('Lorem ipsum dolor sit amet, consectetur adipiscing elit.'); - }); - - test('generating the first 3 paragraphs', () => { - let expected = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam scelerisque diam gravida justo volutpat blandit. Nullam consectetur eu sem in posuere. Integer varius nisi risus, eu congue magna feugiat quis. Duis lectus diam, bibendum ut aliquam sit amet, pellentesque porttitor metus. Integer vel dictum nunc. Nulla pretium, ante sit amet condimentum tempus, nulla urna vestibulum nisi, ut vulputate felis ligula vitae libero. Nulla ut massa consequat, vulputate sem eu, egestas turpis. Aenean id pulvinar felis, in efficitur eros. Phasellus a est et sapien faucibus suscipit sit amet at eros. -Donec eu quam placerat, efficitur sem et, pretium sem. Mauris pretium nibh mi, a convallis lacus pellentesque et. Mauris ultrices sodales tortor, non posuere leo pulvinar ac. Suspendisse potenti. Praesent pharetra congue dolor, eu blandit eros dictum ut. Fusce urna leo, tempus id sagittis sed, porta quis turpis. Mauris varius, nisi sed ornare semper, mauris tortor condimentum erat, id imperdiet nunc neque ut ipsum. Cras eu tincidunt diam, eget sollicitudin tellus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nunc id leo dapibus, condimentum lectus sed, imperdiet libero. Integer convallis ornare sapien in semper. Suspendisse eget lacus sodales, viverra dolor id, rutrum tellus. Mauris consequat sagittis tincidunt. -Proin velit leo, elementum vitae varius vitae, volutpat vehicula nibh. Etiam vel dui arcu. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nullam at finibus erat. Aliquam et risus viverra nulla elementum sodales. Etiam bibendum lacus ac dolor fermentum elementum. Etiam aliquam fringilla elit sed condimentum. Sed molestie aliquet aliquam. Pellentesque porta neque ac massa pharetra, vitae porta nibh finibus. Praesent nec auctor sem, non aliquam lorem. Integer maximus sed quam nec malesuada. Quisque quis molestie orci. Nullam venenatis dolor non tincidunt egestas. Aliquam dignissim sed sapien in auctor. Praesent rhoncus sem ut accumsan vestibulum. Vestibulum bibendum egestas semper.`; - expect(paragraph(3)).toBe(expected); - }); - - test('generating the first 5 paragraphs', () => { - let expected = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam scelerisque diam gravida justo volutpat blandit. Nullam consectetur eu sem in posuere. Integer varius nisi risus, eu congue magna feugiat quis. Duis lectus diam, bibendum ut aliquam sit amet, pellentesque porttitor metus. Integer vel dictum nunc. Nulla pretium, ante sit amet condimentum tempus, nulla urna vestibulum nisi, ut vulputate felis ligula vitae libero. Nulla ut massa consequat, vulputate sem eu, egestas turpis. Aenean id pulvinar felis, in efficitur eros. Phasellus a est et sapien faucibus suscipit sit amet at eros. -Donec eu quam placerat, efficitur sem et, pretium sem. Mauris pretium nibh mi, a convallis lacus pellentesque et. Mauris ultrices sodales tortor, non posuere leo pulvinar ac. Suspendisse potenti. Praesent pharetra congue dolor, eu blandit eros dictum ut. Fusce urna leo, tempus id sagittis sed, porta quis turpis. Mauris varius, nisi sed ornare semper, mauris tortor condimentum erat, id imperdiet nunc neque ut ipsum. Cras eu tincidunt diam, eget sollicitudin tellus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nunc id leo dapibus, condimentum lectus sed, imperdiet libero. Integer convallis ornare sapien in semper. Suspendisse eget lacus sodales, viverra dolor id, rutrum tellus. Mauris consequat sagittis tincidunt. -Proin velit leo, elementum vitae varius vitae, volutpat vehicula nibh. Etiam vel dui arcu. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nullam at finibus erat. Aliquam et risus viverra nulla elementum sodales. Etiam bibendum lacus ac dolor fermentum elementum. Etiam aliquam fringilla elit sed condimentum. Sed molestie aliquet aliquam. Pellentesque porta neque ac massa pharetra, vitae porta nibh finibus. Praesent nec auctor sem, non aliquam lorem. Integer maximus sed quam nec malesuada. Quisque quis molestie orci. Nullam venenatis dolor non tincidunt egestas. Aliquam dignissim sed sapien in auctor. Praesent rhoncus sem ut accumsan vestibulum. Vestibulum bibendum egestas semper. -Integer nec odio tincidunt, hendrerit justo vel, molestie metus. Donec placerat felis ac condimentum mattis. Sed et massa ac eros pulvinar vulputate. Fusce vitae dictum turpis. Curabitur tellus magna, pharetra non bibendum sed, sagittis luctus nibh. Sed sit amet sodales justo. Ut congue tortor nec augue ultricies aliquet. Suspendisse potenti. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Etiam eget metus ligula. Donec posuere ante eget arcu mattis, in egestas mauris scelerisque. Nam lacus lorem, convallis sit amet semper id, pretium vel quam. Cras rhoncus volutpat nibh eu fermentum. Donec faucibus posuere nunc congue laoreet. Nunc mi magna, viverra posuere accumsan id, maximus nec nunc. -Aenean porttitor tellus quis enim dapibus, ut luctus est elementum. Donec dignissim tellus eu ligula accumsan, quis rutrum enim lacinia. Fusce tempus leo et tempor tempor. Vestibulum rutrum diam sem, ut mattis lectus eleifend in. Morbi a placerat diam. Nulla vel mauris ut sem venenatis interdum. Nullam tempus rutrum nibh, et viverra velit molestie ut. Proin vehicula, tortor in efficitur faucibus, turpis ante pulvinar lacus, eu ullamcorper diam velit non felis. Vivamus tristique lobortis diam at tempor.`; - expect(paragraph(5)).toBe(expected); - }); -}); diff --git a/src/pages/exercises/string-lorem-ipsum-generator/_codes/js/response/lorem-ipsum-generator.node.test.js b/src/pages/exercises/string-lorem-ipsum-generator/_codes/js/response/lorem-ipsum-generator.test.js similarity index 100% rename from src/pages/exercises/string-lorem-ipsum-generator/_codes/js/response/lorem-ipsum-generator.node.test.js rename to src/pages/exercises/string-lorem-ipsum-generator/_codes/js/response/lorem-ipsum-generator.test.js diff --git a/src/pages/exercises/string-parse-table-md2html/_codes/js/code/table-convert-md2html.jest.test.js b/src/pages/exercises/string-parse-table-md2html/_codes/js/code/table-convert-md2html.jest.test.js deleted file mode 100644 index ac7d9be7..00000000 --- a/src/pages/exercises/string-parse-table-md2html/_codes/js/code/table-convert-md2html.jest.test.js +++ /dev/null @@ -1,26 +0,0 @@ -import { md2html } from './table-convert-md2html.js'; - -describe('Markdown Util', () => { - test('converting table to html', () => { - const table = `| Header One | Header Two | -| -------------- | -------------- | -| Item One | Item Two |`; - - const expected = ` - - - - - - - - - - - - -
Header OneHeader Two
Item OneItem Two
`; - - expect(md2html(table)).toBe(expected); - }); -}); diff --git a/src/pages/exercises/string-parse-table-md2html/_codes/js/code/table-convert-md2html.node.test.js b/src/pages/exercises/string-parse-table-md2html/_codes/js/code/table-convert-md2html.test.js similarity index 100% rename from src/pages/exercises/string-parse-table-md2html/_codes/js/code/table-convert-md2html.node.test.js rename to src/pages/exercises/string-parse-table-md2html/_codes/js/code/table-convert-md2html.test.js diff --git a/src/pages/exercises/string-parse-table-md2html/_codes/js/response/table-convert-md2html.jest.test.js b/src/pages/exercises/string-parse-table-md2html/_codes/js/response/table-convert-md2html.jest.test.js deleted file mode 100644 index ac7d9be7..00000000 --- a/src/pages/exercises/string-parse-table-md2html/_codes/js/response/table-convert-md2html.jest.test.js +++ /dev/null @@ -1,26 +0,0 @@ -import { md2html } from './table-convert-md2html.js'; - -describe('Markdown Util', () => { - test('converting table to html', () => { - const table = `| Header One | Header Two | -| -------------- | -------------- | -| Item One | Item Two |`; - - const expected = ` - - - - - - - - - - - - -
Header OneHeader Two
Item OneItem Two
`; - - expect(md2html(table)).toBe(expected); - }); -}); diff --git a/src/pages/exercises/string-parse-table-md2html/_codes/js/response/table-convert-md2html.node.test.js b/src/pages/exercises/string-parse-table-md2html/_codes/js/response/table-convert-md2html.test.js similarity index 100% rename from src/pages/exercises/string-parse-table-md2html/_codes/js/response/table-convert-md2html.node.test.js rename to src/pages/exercises/string-parse-table-md2html/_codes/js/response/table-convert-md2html.test.js diff --git a/src/pages/exercises/string-rna-transcription/_codes/js/code/rna-transcription.jest.test.js b/src/pages/exercises/string-rna-transcription/_codes/js/code/rna-transcription.jest.test.js deleted file mode 100644 index c1122115..00000000 --- a/src/pages/exercises/string-rna-transcription/_codes/js/code/rna-transcription.jest.test.js +++ /dev/null @@ -1,23 +0,0 @@ -import { toRna } from './rna-transcription.js'; - -describe('RNA', function() { - test('transcribing cytosine to guanine', function() { - expect(toRna('C')).toEqual('G'); - }); - - test.skip('transcribing guanine to cytosine', function() { - expect(toRna('G')).toEqual('C'); - }); - - test.skip('transcribing adenine to uracil', function() { - expect(toRna('A')).toEqual('U'); - }); - - test.skip('transcribing thymine to adenine', function() { - expect(toRna('T')).toEqual('A'); - }); - - test.skip('transcribing all dna nucleotides to their rna complements', function() { - expect(toRna('ACGTGGTCTTAA')).toEqual('UGCACCAGAAUU'); - }); -}); diff --git a/src/pages/exercises/string-rna-transcription/_codes/js/code/rna-transcription.node.test.js b/src/pages/exercises/string-rna-transcription/_codes/js/code/rna-transcription.test.js similarity index 100% rename from src/pages/exercises/string-rna-transcription/_codes/js/code/rna-transcription.node.test.js rename to src/pages/exercises/string-rna-transcription/_codes/js/code/rna-transcription.test.js diff --git a/src/pages/exercises/string-rna-transcription/_codes/js/response/rna-transcription.jest.test.js b/src/pages/exercises/string-rna-transcription/_codes/js/response/rna-transcription.jest.test.js deleted file mode 100644 index 53b05a17..00000000 --- a/src/pages/exercises/string-rna-transcription/_codes/js/response/rna-transcription.jest.test.js +++ /dev/null @@ -1,23 +0,0 @@ -import { toRna } from './rna-transcription.js'; - -describe('RNA', function() { - test('transcribing cytosine to guanine', () => { - expect(toRna('C')).toEqual('G'); - }); - - test('transcribing guanine to cytosine', () => { - expect(toRna('G')).toEqual('C'); - }); - - test('transcribing adenine to uracil', () => { - expect(toRna('A')).toEqual('U'); - }); - - test('transcribing thymine to adenine', () => { - expect(toRna('T')).toEqual('A'); - }); - - test('transcribing all dna nucleotides to their rna complements', () => { - expect(toRna('ACGTGGTCTTAA')).toEqual('UGCACCAGAAUU'); - }); -}); diff --git a/src/pages/exercises/string-rna-transcription/_codes/js/response/rna-transcription.node.test.js b/src/pages/exercises/string-rna-transcription/_codes/js/response/rna-transcription.test.js similarity index 100% rename from src/pages/exercises/string-rna-transcription/_codes/js/response/rna-transcription.node.test.js rename to src/pages/exercises/string-rna-transcription/_codes/js/response/rna-transcription.test.js diff --git a/src/pages/exercises/string-simple-substitution/_codes/js/code/simple-substitution.jest.test.js b/src/pages/exercises/string-simple-substitution/_codes/js/code/simple-substitution.jest.test.js deleted file mode 100644 index c527ce6b..00000000 --- a/src/pages/exercises/string-simple-substitution/_codes/js/code/simple-substitution.jest.test.js +++ /dev/null @@ -1,19 +0,0 @@ -import { substitution } from './simple-substitution.js'; - -describe('Basic Leet', () => { - test('converting message to "lorem ipsum"', () => { - // https://simple.wikipedia.org/wiki/Leet - // http://www.robertecker.com/hp/research/leet-converter.php?lang=en - expect(substitution('lorem ipsum', 'aegiost', '4361057')).toBe('l0r3m 1p5um'); - }); -}); - -describe.skip('Simple Substitution', () => { - test('converting to basic leet', () => { - expect(substitution('lorem ipsum', 'aegiost', '4361057')).toBe('l0r3m 1p5um'); - }); - - test('converting to custom leet', () => { - expect(substitution('senha secreta', 'aegiost', '!@#$%&*')).toBe('&@nh! &@cr@*!'); - }); -}); diff --git a/src/pages/exercises/string-simple-substitution/_codes/js/code/simple-substitution.node.test.js b/src/pages/exercises/string-simple-substitution/_codes/js/code/simple-substitution.test.js similarity index 100% rename from src/pages/exercises/string-simple-substitution/_codes/js/code/simple-substitution.node.test.js rename to src/pages/exercises/string-simple-substitution/_codes/js/code/simple-substitution.test.js diff --git a/src/pages/exercises/string-simple-substitution/_codes/js/response/simple-substitution.jest.test.js b/src/pages/exercises/string-simple-substitution/_codes/js/response/simple-substitution.jest.test.js deleted file mode 100644 index c54793a1..00000000 --- a/src/pages/exercises/string-simple-substitution/_codes/js/response/simple-substitution.jest.test.js +++ /dev/null @@ -1,17 +0,0 @@ -import { substitution } from './simple-substitution.js'; - -describe('Basic Leet', () => { - test('converting message to "lorem ipsum"', () => { - expect(substitution('lorem ipsum', 'aegiost', '4361057')).toBe('l0r3m 1p5um'); - }); -}); - -describe('Simple Substitution', () => { - test('converting to basic leet', () => { - expect(substitution('lorem ipsum', 'aegiost', '4361057')).toBe('l0r3m 1p5um'); - }); - - test('converting to custom leet', () => { - expect(substitution('senha secreta', 'aegiost', '!@#$%&*')).toBe('&@nh! &@cr@*!'); - }); -}); diff --git a/src/pages/exercises/string-simple-substitution/_codes/js/response/simple-substitution.node.test.js b/src/pages/exercises/string-simple-substitution/_codes/js/response/simple-substitution.test.js similarity index 100% rename from src/pages/exercises/string-simple-substitution/_codes/js/response/simple-substitution.node.test.js rename to src/pages/exercises/string-simple-substitution/_codes/js/response/simple-substitution.test.js diff --git a/src/pages/exercises/string-table-generator/_codes/js/code/table-generator.jest.test.js b/src/pages/exercises/string-table-generator/_codes/js/code/table-generator.jest.test.js deleted file mode 100644 index 20c4921e..00000000 --- a/src/pages/exercises/string-table-generator/_codes/js/code/table-generator.jest.test.js +++ /dev/null @@ -1,47 +0,0 @@ -import { createTable, createTableHTML } from './table-generator.js'; - -describe('Table Generator', () => { - test('making text table', () => { - let expected = `1.1 1.2 1.3 1.4 -2.1 2.2 2.3 2.4 -3.1 3.2 3.3 3.4 -`; - - expect(createTable(3, 4)).toBe(expected); - }); - - test.skip('making text table', () => { - let expected = `Item 1.1 Item 1.2 Item 1.3 Item 1.4 -Item 2.1 Item 2.2 Item 2.3 Item 2.4 -Item 3.1 Item 3.2 Item 3.3 Item 3.4 -`; - - expect(createTable(3, 4, 'Item')).toBe(expected); - }); - - test.skip('making HTML table', () => { - let expected = ` - - - - - - - - - - - - - - - - - - -
1.11.21.31.4
2.12.22.32.4
3.13.23.33.4
-`; - - expect(createTableHTML(3, 4)).toBe(expected); - }); -}); diff --git a/src/pages/exercises/string-table-generator/_codes/js/code/table-generator.node.test.js b/src/pages/exercises/string-table-generator/_codes/js/code/table-generator.test.js similarity index 100% rename from src/pages/exercises/string-table-generator/_codes/js/code/table-generator.node.test.js rename to src/pages/exercises/string-table-generator/_codes/js/code/table-generator.test.js diff --git a/src/pages/exercises/string-table-generator/_codes/js/response/table-generator.jest.test.js b/src/pages/exercises/string-table-generator/_codes/js/response/table-generator.jest.test.js deleted file mode 100644 index 1f6b07d5..00000000 --- a/src/pages/exercises/string-table-generator/_codes/js/response/table-generator.jest.test.js +++ /dev/null @@ -1,47 +0,0 @@ -import { createTable, createTableHTML } from './table-generator.js'; - -describe('Table Generator', () => { - test('making text table', () => { - let expected = `1.1 1.2 1.3 1.4 -2.1 2.2 2.3 2.4 -3.1 3.2 3.3 3.4 -`; - - expect(createTable(3, 4)).toBe(expected); - }); - - test('making text table', () => { - let expected = `Item 1.1 Item 1.2 Item 1.3 Item 1.4 -Item 2.1 Item 2.2 Item 2.3 Item 2.4 -Item 3.1 Item 3.2 Item 3.3 Item 3.4 -`; - - expect(createTable(3, 4, 'Item')).toBe(expected); - }); - - test('making HTML table', () => { - let expected = ` - - - - - - - - - - - - - - - - - - -
1.11.21.31.4
2.12.22.32.4
3.13.23.33.4
-`; - - expect(createTableHTML(3, 4)).toBe(expected); - }); -}); diff --git a/src/pages/exercises/string-table-generator/_codes/js/response/table-generator.node.test.js b/src/pages/exercises/string-table-generator/_codes/js/response/table-generator.test.js similarity index 100% rename from src/pages/exercises/string-table-generator/_codes/js/response/table-generator.node.test.js rename to src/pages/exercises/string-table-generator/_codes/js/response/table-generator.test.js diff --git a/src/pages/exercises/string-to-number/_codes/js/code/parser.jest.test.js b/src/pages/exercises/string-to-number/_codes/js/code/parser.jest.test.js deleted file mode 100644 index 18477ce8..00000000 --- a/src/pages/exercises/string-to-number/_codes/js/code/parser.jest.test.js +++ /dev/null @@ -1,51 +0,0 @@ -import { str2hex, hex2str, str2bin, bin2str, str2dec, dec2str } from './parser.js'; - -describe('Number Util', () => { - test('converting string to hexa', () => { - expect(str2hex('AB')).toBe('41 42'); - }); - - test.skip('converting string to hexa', () => { - expect(str2hex('ABC')).toBe('41 42 43'); - }); - - test.skip('converting hexa to string', () => { - expect(hex2str('41 42')).toBe('AB'); - }); - - test.skip('converting hexa to string', () => { - expect(hex2str('41 42 43')).toBe('ABC'); - }); - - test.skip('converting string to binary', () => { - expect(str2bin('AB')).toBe('01000001 01000010'); - }); - - test.skip('converting string to binary', () => { - expect(str2bin('ABC')).toBe('01000001 01000010 01000011'); - }); - - test.skip('converting binary to string', () => { - expect(bin2str('01000001 01000010')).toBe('AB'); - }); - - test.skip('converting binary to string', () => { - expect(bin2str('01000001 01000010 01000011')).toBe('ABC'); - }); - - test.skip('converting string to decimals', () => { - expect(str2dec('AB')).toBe('065 066'); - }); - - test.skip('converting string to decimals', () => { - expect(str2dec('ABC')).toBe('065 066 067'); - }); - - test.skip('converting decimal to string', () => { - expect(dec2str('065 066')).toBe('AB'); - }); - - test.skip('converting decimal to string', () => { - expect(dec2str('065 066 067')).toBe('ABC'); - }); -}); diff --git a/src/pages/exercises/string-to-number/_codes/js/code/parser.node.test.js b/src/pages/exercises/string-to-number/_codes/js/code/parser.test.js similarity index 100% rename from src/pages/exercises/string-to-number/_codes/js/code/parser.node.test.js rename to src/pages/exercises/string-to-number/_codes/js/code/parser.test.js diff --git a/src/pages/exercises/string-to-number/_codes/js/response/parser.jest.test.js b/src/pages/exercises/string-to-number/_codes/js/response/parser.jest.test.js deleted file mode 100644 index ae53cee9..00000000 --- a/src/pages/exercises/string-to-number/_codes/js/response/parser.jest.test.js +++ /dev/null @@ -1,51 +0,0 @@ -import { str2hex, hex2str, str2bin, bin2str, str2dec, dec2str } from './parser.js'; - -describe('Number Util', () => { - test('converting string to hexa', () => { - expect(str2hex('AB')).toBe('41 42'); - }); - - test('converting string to hexa', () => { - expect(str2hex('ABC')).toBe('41 42 43'); - }); - - test('converting hexa to string', () => { - expect(hex2str('41 42')).toBe('AB'); - }); - - test('converting hexa to string', () => { - expect(hex2str('41 42 43')).toBe('ABC'); - }); - - test('converting string to binary', () => { - expect(str2bin('AB')).toBe('01000001 01000010'); - }); - - test('converting string to binary', () => { - expect(str2bin('ABC')).toBe('01000001 01000010 01000011'); - }); - - test('converting binary to string', () => { - expect(bin2str('01000001 01000010')).toBe('AB'); - }); - - test('converting binary to string', () => { - expect(bin2str('01000001 01000010 01000011')).toBe('ABC'); - }); - - test('converting string to decimals', () => { - expect(str2dec('AB')).toBe('065 066'); - }); - - test('converting string to decimals', () => { - expect(str2dec('ABC')).toBe('065 066 067'); - }); - - test('converting decimal to string', () => { - expect(dec2str('065 066')).toBe('AB'); - }); - - test('converting decimal to string', () => { - expect(dec2str('065 066 067')).toBe('ABC'); - }); -}); diff --git a/src/pages/exercises/string-to-number/_codes/js/response/parser.node.test.js b/src/pages/exercises/string-to-number/_codes/js/response/parser.test.js similarity index 100% rename from src/pages/exercises/string-to-number/_codes/js/response/parser.node.test.js rename to src/pages/exercises/string-to-number/_codes/js/response/parser.test.js diff --git a/src/pages/exercises/string-util/_codes/js/code/string-util.jest.test.js b/src/pages/exercises/string-util/_codes/js/code/string-util.jest.test.js deleted file mode 100644 index 764a20be..00000000 --- a/src/pages/exercises/string-util/_codes/js/code/string-util.jest.test.js +++ /dev/null @@ -1,35 +0,0 @@ -import { formatter } from './string-util.js'; - -describe('String Util', () => { - test('changing case for text to uppercase', () => { - expect(formatter('lorem ipsum dolor', 'uppercase')).toBe('LOREM IPSUM DOLOR'); - }); - - test.skip('change case for text to lowercase', () => { - expect(formatter('LOREM IPSUM DOLOR', 'lowercase')).toBe('lorem ipsum dolor'); - }); - - test.skip('change case for text to camelcase', () => { - expect(formatter('LOREM IPSUM DOLOR', 'camelcase')).toBe('Lorem Ipsum Dolor'); - }); - - test.skip('change case for text to snakecase', () => { - expect(formatter('lorem ipsum dolor', 'snakecase')).toBe('lorem_ipsum_dolor'); - }); - - test.skip('reversing text', () => { - expect(formatter('lorem ipsum dolor', 'reverse')).toBe('rolod muspi merol'); - }); - - test.skip('counting chars', () => { - expect(formatter('lorem\nipsum dolor', 'countchar')).toBe(17); - }); - - test.skip('counting words', () => { - expect(formatter('lorem\nipsum dolor', 'countword')).toBe(3); - }); - - test.skip('counting lines', () => { - expect(formatter('lorem\nipsum dolor', 'countline')).toBe(2); - }); -}); diff --git a/src/pages/exercises/string-util/_codes/js/code/string-util.node.test.js b/src/pages/exercises/string-util/_codes/js/code/string-util.test.js similarity index 100% rename from src/pages/exercises/string-util/_codes/js/code/string-util.node.test.js rename to src/pages/exercises/string-util/_codes/js/code/string-util.test.js diff --git a/src/pages/exercises/string-util/_codes/js/response/string-util.jest.test.js b/src/pages/exercises/string-util/_codes/js/response/string-util.jest.test.js deleted file mode 100644 index ea166fae..00000000 --- a/src/pages/exercises/string-util/_codes/js/response/string-util.jest.test.js +++ /dev/null @@ -1,35 +0,0 @@ -import { formatter } from './string-util.js'; - -describe('String Util', () => { - test('changing case for text to uppercase', () => { - expect(formatter('lorem ipsum dolor', 'uppercase')).toBe('LOREM IPSUM DOLOR'); - }); - - test('change case for text to lowercase', () => { - expect(formatter('LOREM IPSUM DOLOR', 'lowercase')).toBe('lorem ipsum dolor'); - }); - - test('change case for text to camelcase', () => { - expect(formatter('LOREM IPSUM DOLOR', 'camelcase')).toBe('Lorem Ipsum Dolor'); - }); - - test('change case for text to snakecase', () => { - expect(formatter('lorem ipsum dolor', 'snakecase')).toBe('lorem_ipsum_dolor'); - }); - - test('reversing text', () => { - expect(formatter('lorem ipsum dolor', 'reverse')).toBe('rolod muspi merol'); - }); - - test('counting chars', () => { - expect(formatter('lorem\nipsum dolor', 'countchar')).toBe(17); - }); - - test('counting words', () => { - expect(formatter('lorem\nipsum dolor', 'countword')).toBe(3); - }); - - test('counting lines', () => { - expect(formatter('lorem\nipsum dolor', 'countline')).toBe(2); - }); -}); diff --git a/src/pages/exercises/string-util/_codes/js/response/string-util.node.test.js b/src/pages/exercises/string-util/_codes/js/response/string-util.test.js similarity index 100% rename from src/pages/exercises/string-util/_codes/js/response/string-util.node.test.js rename to src/pages/exercises/string-util/_codes/js/response/string-util.test.js diff --git a/src/pages/exercises/string-validating-cpf/_codes/js/code/validating-cpf.jest.test.js b/src/pages/exercises/string-validating-cpf/_codes/js/code/validating-cpf.jest.test.js deleted file mode 100644 index daaf2ce3..00000000 --- a/src/pages/exercises/string-validating-cpf/_codes/js/code/validating-cpf.jest.test.js +++ /dev/null @@ -1,7 +0,0 @@ -import { checkingDigitCpf } from './validating-cpf.js'; - -describe('Checking Digit CPF', () => { - test('the check digit of 123456789 is 09', () => { - expect(checkingDigitCpf('12345678909')).toBe(true); - }); -}); diff --git a/src/pages/exercises/string-validating-cpf/_codes/js/code/validating-cpf.node.test.js b/src/pages/exercises/string-validating-cpf/_codes/js/code/validating-cpf.test.js similarity index 100% rename from src/pages/exercises/string-validating-cpf/_codes/js/code/validating-cpf.node.test.js rename to src/pages/exercises/string-validating-cpf/_codes/js/code/validating-cpf.test.js diff --git a/src/pages/exercises/string-validating-cpf/_codes/js/response/validating-cpf.jest.test.js b/src/pages/exercises/string-validating-cpf/_codes/js/response/validating-cpf.jest.test.js deleted file mode 100644 index daaf2ce3..00000000 --- a/src/pages/exercises/string-validating-cpf/_codes/js/response/validating-cpf.jest.test.js +++ /dev/null @@ -1,7 +0,0 @@ -import { checkingDigitCpf } from './validating-cpf.js'; - -describe('Checking Digit CPF', () => { - test('the check digit of 123456789 is 09', () => { - expect(checkingDigitCpf('12345678909')).toBe(true); - }); -}); diff --git a/src/pages/exercises/string-validating-cpf/_codes/js/response/validating-cpf.node.test.js b/src/pages/exercises/string-validating-cpf/_codes/js/response/validating-cpf.test.js similarity index 100% rename from src/pages/exercises/string-validating-cpf/_codes/js/response/validating-cpf.node.test.js rename to src/pages/exercises/string-validating-cpf/_codes/js/response/validating-cpf.test.js diff --git a/src/pages/exercises/test.sh b/src/pages/exercises/test.sh index 03e11b38..1ab536ae 100755 --- a/src/pages/exercises/test.sh +++ b/src/pages/exercises/test.sh @@ -1,5 +1,5 @@ -node --test **/js/response/*.node.test.js -# node --test ./src/pages/exercises/array-*/_codes/js/response/*.node.test.js +node --test **/js/response/*.test.js +# node --test ./src/pages/exercises/array-*/_codes/js/response/*.test.js # find ./src/pages/exercises -type f -name '*.test.js' | grep -vE 'jest|node_modules|/code/' | grep array | xargs -I {} node --test {} # find . -type f -name '*.test.js' | grep -vE 'jest|node_modules|/code/' | grep array | xargs -I {} node --test {} # find ./src/pages/exercises -type f -name '*.test.js' |