diff --git a/docs/ciphers/jest-html-reporters-attach/test-report/result.js b/docs/ciphers/jest-html-reporters-attach/test-report/result.js index 6068288..9cf08ab 100644 --- a/docs/ciphers/jest-html-reporters-attach/test-report/result.js +++ b/docs/ciphers/jest-html-reporters-attach/test-report/result.js @@ -1 +1 @@ -window.jest_html_reporters_callback__({"numFailedTestSuites":0,"numFailedTests":0,"numPassedTestSuites":3,"numPassedTests":30,"numPendingTestSuites":0,"numPendingTests":0,"numRuntimeErrorTestSuites":0,"numTodoTests":0,"numTotalTestSuites":3,"numTotalTests":30,"startTime":1708024488737,"success":false,"testResults":[{"numFailingTests":0,"numPassingTests":5,"numPendingTests":0,"numTodoTests":0,"perfStats":{"end":1708024491934,"runtime":2995,"slow":false,"start":1708024488939},"testFilePath":"/encrypted-uri/packages/ciphers/aes.test.ts","failureMessage":null,"testResults":[{"ancestorTitles":["success flow aes"],"duration":47,"failureMessages":[],"fullName":"success flow aes cbc","status":"passed","title":"cbc"},{"ancestorTitles":["success flow aes"],"duration":6,"failureMessages":[],"fullName":"success flow aes ctr","status":"passed","title":"ctr"},{"ancestorTitles":["success flow aes"],"duration":5,"failureMessages":[],"fullName":"success flow aes ecb","status":"passed","title":"ecb"},{"ancestorTitles":["success flow aes"],"duration":5,"failureMessages":[],"fullName":"success flow aes gcm","status":"passed","title":"gcm"},{"ancestorTitles":["success flow aes"],"duration":6,"failureMessages":[],"fullName":"success flow aes siv","status":"passed","title":"siv"}]},{"numFailingTests":0,"numPassingTests":12,"numPendingTests":0,"numTodoTests":0,"perfStats":{"end":1708024492019,"runtime":3078,"slow":false,"start":1708024488941},"testFilePath":"/encrypted-uri/packages/ciphers/kdf.test.ts","failureMessage":null,"testResults":[{"ancestorTitles":["kdf success flow"],"duration":40,"failureMessages":[],"fullName":"kdf success flow [2] kdf include all parameters including default","status":"passed","title":"[2] kdf include all parameters including default"},{"ancestorTitles":["kdf success flow"],"duration":23,"failureMessages":[],"fullName":"kdf success flow [3] kdf with hasher sha512","status":"passed","title":"[3] kdf with hasher sha512"},{"ancestorTitles":["kdf success flow"],"duration":27,"failureMessages":[],"fullName":"kdf success flow [4] kdf with hasher sha512_256","status":"passed","title":"[4] kdf with hasher sha512_256"},{"ancestorTitles":["kdf success flow"],"duration":16,"failureMessages":[],"fullName":"kdf success flow [5] kdf with hasher sha384","status":"passed","title":"[5] kdf with hasher sha384"},{"ancestorTitles":["kdf success flow"],"duration":17,"failureMessages":[],"fullName":"kdf success flow [6] kdf with hasher sha3_512","status":"passed","title":"[6] kdf with hasher sha3_512"},{"ancestorTitles":["kdf success flow"],"duration":5,"failureMessages":[],"fullName":"kdf success flow [7] kdf with hasher sha3_384","status":"passed","title":"[7] kdf with hasher sha3_384"},{"ancestorTitles":["kdf success flow"],"duration":4,"failureMessages":[],"fullName":"kdf success flow [8] kdf with hasher sha3_256","status":"passed","title":"[8] kdf with hasher sha3_256"},{"ancestorTitles":["kdf success flow"],"duration":5,"failureMessages":[],"fullName":"kdf success flow [9] kdf with hasher sha3_224","status":"passed","title":"[9] kdf with hasher sha3_224"},{"ancestorTitles":["kdf success flow"],"duration":4,"failureMessages":[],"fullName":"kdf success flow [10] kdf with hasher keccak_512","status":"passed","title":"[10] kdf with hasher keccak_512"},{"ancestorTitles":["kdf success flow"],"duration":3,"failureMessages":[],"fullName":"kdf success flow [11] kdf with hasher keccak_384","status":"passed","title":"[11] kdf with hasher keccak_384"},{"ancestorTitles":["kdf success flow"],"duration":4,"failureMessages":[],"fullName":"kdf success flow [12] kdf with hasher keccak_256","status":"passed","title":"[12] kdf with hasher keccak_256"},{"ancestorTitles":["kdf success flow"],"duration":5,"failureMessages":[],"fullName":"kdf success flow [13] kdf with hasher keccak_224","status":"passed","title":"[13] kdf with hasher keccak_224"}]},{"numFailingTests":0,"numPassingTests":13,"numPendingTests":0,"numTodoTests":0,"perfStats":{"end":1708024493136,"runtime":4197,"slow":false,"start":1708024488939},"testFilePath":"/encrypted-uri/packages/ciphers/params.test.ts","failureMessage":null,"testResults":[{"ancestorTitles":["hashing customization"],"duration":56,"failureMessages":[],"fullName":"hashing customization [3] kdf with hasher sha512","status":"passed","title":"[3] kdf with hasher sha512"},{"ancestorTitles":["hashing customization"],"duration":15,"failureMessages":[],"fullName":"hashing customization [4] kdf with hasher sha512_256","status":"passed","title":"[4] kdf with hasher sha512_256"},{"ancestorTitles":["hashing customization"],"duration":15,"failureMessages":[],"fullName":"hashing customization [5] kdf with hasher sha384","status":"passed","title":"[5] kdf with hasher sha384"},{"ancestorTitles":["hashing customization"],"duration":10,"failureMessages":[],"fullName":"hashing customization [6] kdf with hasher sha3_512","status":"passed","title":"[6] kdf with hasher sha3_512"},{"ancestorTitles":["hashing customization"],"duration":5,"failureMessages":[],"fullName":"hashing customization [7] kdf with hasher sha3_384","status":"passed","title":"[7] kdf with hasher sha3_384"},{"ancestorTitles":["hashing customization"],"duration":2,"failureMessages":[],"fullName":"hashing customization [8] kdf with hasher sha3_256","status":"passed","title":"[8] kdf with hasher sha3_256"},{"ancestorTitles":["hashing customization"],"duration":3,"failureMessages":[],"fullName":"hashing customization [9] kdf with hasher sha3_224","status":"passed","title":"[9] kdf with hasher sha3_224"},{"ancestorTitles":["hashing customization"],"duration":3,"failureMessages":[],"fullName":"hashing customization [10] kdf with hasher keccak_512","status":"passed","title":"[10] kdf with hasher keccak_512"},{"ancestorTitles":["hashing customization"],"duration":2,"failureMessages":[],"fullName":"hashing customization [11] kdf with hasher keccak_384","status":"passed","title":"[11] kdf with hasher keccak_384"},{"ancestorTitles":["hashing customization"],"duration":3,"failureMessages":[],"fullName":"hashing customization [12] kdf with hasher keccak_256","status":"passed","title":"[12] kdf with hasher keccak_256"},{"ancestorTitles":["checking if params are correctly encoded"],"duration":1161,"failureMessages":[],"fullName":"checking if params are correctly encoded [1] overriding default values in decrypt","status":"passed","title":"[1] overriding default values in decrypt"},{"ancestorTitles":["checking if params are correctly encoded"],"duration":2,"failureMessages":[],"fullName":"checking if params are correctly encoded [2] kdf include all parameters including default","status":"passed","title":"[2] kdf include all parameters including default"},{"ancestorTitles":["checking if params are correctly encoded"],"duration":1,"failureMessages":[],"fullName":"checking if params are correctly encoded [3] kdf with algorithm not set","status":"passed","title":"[3] kdf with algorithm not set"}]}],"config":{"bail":0,"changedFilesWithAncestor":false,"ci":false,"collectCoverage":false,"collectCoverageFrom":[],"coverageDirectory":"/encrypted-uri/packages/ciphers/coverage","coverageProvider":"babel","coverageReporters":["json","text","lcov","clover"],"detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"expand":false,"findRelatedTests":false,"forceExit":false,"json":false,"lastCommit":false,"listTests":false,"logHeapUsage":false,"maxConcurrency":5,"maxWorkers":7,"noStackTrace":false,"nonFlagArgs":[],"notify":false,"notifyMode":"failure-change","onlyChanged":false,"onlyFailures":false,"openHandlesTimeout":1000,"passWithNoTests":false,"projects":[],"reporters":[["default",{}],["/encrypted-uri/packages/ciphers/node_modules/jest-html-reporters/index.js",{"publicPath":"../../docs/ciphers","filename":"test-report.html","expand":true}]],"rootDir":"/encrypted-uri/packages/ciphers","runTestsByPath":false,"seed":655552845,"skipFilter":false,"snapshotFormat":{"escapeString":false,"printBasicPrototype":false},"testFailureExitCode":1,"testPathPattern":"","testSequencer":"/encrypted-uri/packages/ciphers/node_modules/@jest/test-sequencer/build/index.js","updateSnapshot":"new","useStderr":false,"watch":false,"watchAll":false,"watchman":true,"workerThreads":false},"endTime":1708024493164,"_reporterOptions":{"publicPath":"../../docs/ciphers","filename":"test-report.html","expand":true,"pageTitle":"","hideIcon":false,"testCommand":"","openReport":false,"failureMessageOnly":0,"enableMergeData":false,"dataMergeLevel":1,"inlineSource":false,"urlForTestFiles":"","darkTheme":false,"includeConsoleLog":false,"stripSkippedTest":false},"logInfoMapping":{},"attachInfos":{}}) \ No newline at end of file +window.jest_html_reporters_callback__({"numFailedTestSuites":0,"numFailedTests":0,"numPassedTestSuites":3,"numPassedTests":30,"numPendingTestSuites":0,"numPendingTests":0,"numRuntimeErrorTestSuites":0,"numTodoTests":0,"numTotalTestSuites":3,"numTotalTests":30,"startTime":1708025713374,"success":false,"testResults":[{"numFailingTests":0,"numPassingTests":5,"numPendingTests":0,"numTodoTests":0,"perfStats":{"end":1708025717655,"runtime":4041,"slow":false,"start":1708025713614},"testFilePath":"/encrypted-uri/packages/ciphers/aes.test.ts","failureMessage":null,"testResults":[{"ancestorTitles":["success flow aes"],"duration":38,"failureMessages":[],"fullName":"success flow aes cbc","status":"passed","title":"cbc"},{"ancestorTitles":["success flow aes"],"duration":3,"failureMessages":[],"fullName":"success flow aes ctr","status":"passed","title":"ctr"},{"ancestorTitles":["success flow aes"],"duration":4,"failureMessages":[],"fullName":"success flow aes ecb","status":"passed","title":"ecb"},{"ancestorTitles":["success flow aes"],"duration":3,"failureMessages":[],"fullName":"success flow aes gcm","status":"passed","title":"gcm"},{"ancestorTitles":["success flow aes"],"duration":5,"failureMessages":[],"fullName":"success flow aes siv","status":"passed","title":"siv"}]},{"numFailingTests":0,"numPassingTests":12,"numPendingTests":0,"numTodoTests":0,"perfStats":{"end":1708025717746,"runtime":4107,"slow":false,"start":1708025713639},"testFilePath":"/encrypted-uri/packages/ciphers/kdf.test.ts","failureMessage":null,"testResults":[{"ancestorTitles":["kdf success flow"],"duration":46,"failureMessages":[],"fullName":"kdf success flow [2] kdf include all parameters including default","status":"passed","title":"[2] kdf include all parameters including default"},{"ancestorTitles":["kdf success flow"],"duration":27,"failureMessages":[],"fullName":"kdf success flow [3] kdf with hasher sha512","status":"passed","title":"[3] kdf with hasher sha512"},{"ancestorTitles":["kdf success flow"],"duration":19,"failureMessages":[],"fullName":"kdf success flow [4] kdf with hasher sha512_256","status":"passed","title":"[4] kdf with hasher sha512_256"},{"ancestorTitles":["kdf success flow"],"duration":12,"failureMessages":[],"fullName":"kdf success flow [5] kdf with hasher sha384","status":"passed","title":"[5] kdf with hasher sha384"},{"ancestorTitles":["kdf success flow"],"duration":12,"failureMessages":[],"fullName":"kdf success flow [6] kdf with hasher sha3_512","status":"passed","title":"[6] kdf with hasher sha3_512"},{"ancestorTitles":["kdf success flow"],"duration":5,"failureMessages":[],"fullName":"kdf success flow [7] kdf with hasher sha3_384","status":"passed","title":"[7] kdf with hasher sha3_384"},{"ancestorTitles":["kdf success flow"],"duration":4,"failureMessages":[],"fullName":"kdf success flow [8] kdf with hasher sha3_256","status":"passed","title":"[8] kdf with hasher sha3_256"},{"ancestorTitles":["kdf success flow"],"duration":8,"failureMessages":[],"fullName":"kdf success flow [9] kdf with hasher sha3_224","status":"passed","title":"[9] kdf with hasher sha3_224"},{"ancestorTitles":["kdf success flow"],"duration":5,"failureMessages":[],"fullName":"kdf success flow [10] kdf with hasher keccak_512","status":"passed","title":"[10] kdf with hasher keccak_512"},{"ancestorTitles":["kdf success flow"],"duration":7,"failureMessages":[],"fullName":"kdf success flow [11] kdf with hasher keccak_384","status":"passed","title":"[11] kdf with hasher keccak_384"},{"ancestorTitles":["kdf success flow"],"duration":5,"failureMessages":[],"fullName":"kdf success flow [12] kdf with hasher keccak_256","status":"passed","title":"[12] kdf with hasher keccak_256"},{"ancestorTitles":["kdf success flow"],"duration":8,"failureMessages":[],"fullName":"kdf success flow [13] kdf with hasher keccak_224","status":"passed","title":"[13] kdf with hasher keccak_224"}]},{"numFailingTests":0,"numPassingTests":13,"numPendingTests":0,"numTodoTests":0,"perfStats":{"end":1708025718911,"runtime":5280,"slow":true,"start":1708025713631},"testFilePath":"/encrypted-uri/packages/ciphers/params.test.ts","failureMessage":null,"testResults":[{"ancestorTitles":["hashing customization"],"duration":53,"failureMessages":[],"fullName":"hashing customization [3] kdf with hasher sha512","status":"passed","title":"[3] kdf with hasher sha512"},{"ancestorTitles":["hashing customization"],"duration":15,"failureMessages":[],"fullName":"hashing customization [4] kdf with hasher sha512_256","status":"passed","title":"[4] kdf with hasher sha512_256"},{"ancestorTitles":["hashing customization"],"duration":16,"failureMessages":[],"fullName":"hashing customization [5] kdf with hasher sha384","status":"passed","title":"[5] kdf with hasher sha384"},{"ancestorTitles":["hashing customization"],"duration":18,"failureMessages":[],"fullName":"hashing customization [6] kdf with hasher sha3_512","status":"passed","title":"[6] kdf with hasher sha3_512"},{"ancestorTitles":["hashing customization"],"duration":5,"failureMessages":[],"fullName":"hashing customization [7] kdf with hasher sha3_384","status":"passed","title":"[7] kdf with hasher sha3_384"},{"ancestorTitles":["hashing customization"],"duration":3,"failureMessages":[],"fullName":"hashing customization [8] kdf with hasher sha3_256","status":"passed","title":"[8] kdf with hasher sha3_256"},{"ancestorTitles":["hashing customization"],"duration":5,"failureMessages":[],"fullName":"hashing customization [9] kdf with hasher sha3_224","status":"passed","title":"[9] kdf with hasher sha3_224"},{"ancestorTitles":["hashing customization"],"duration":4,"failureMessages":[],"fullName":"hashing customization [10] kdf with hasher keccak_512","status":"passed","title":"[10] kdf with hasher keccak_512"},{"ancestorTitles":["hashing customization"],"duration":3,"failureMessages":[],"fullName":"hashing customization [11] kdf with hasher keccak_384","status":"passed","title":"[11] kdf with hasher keccak_384"},{"ancestorTitles":["hashing customization"],"duration":3,"failureMessages":[],"fullName":"hashing customization [12] kdf with hasher keccak_256","status":"passed","title":"[12] kdf with hasher keccak_256"},{"ancestorTitles":["checking if params are correctly encoded"],"duration":1195,"failureMessages":[],"fullName":"checking if params are correctly encoded [1] overriding default values in decrypt","status":"passed","title":"[1] overriding default values in decrypt"},{"ancestorTitles":["checking if params are correctly encoded"],"duration":2,"failureMessages":[],"fullName":"checking if params are correctly encoded [2] kdf include all parameters including default","status":"passed","title":"[2] kdf include all parameters including default"},{"ancestorTitles":["checking if params are correctly encoded"],"duration":1,"failureMessages":[],"fullName":"checking if params are correctly encoded [3] kdf with algorithm not set","status":"passed","title":"[3] kdf with algorithm not set"}]}],"config":{"bail":0,"changedFilesWithAncestor":false,"ci":false,"collectCoverage":false,"collectCoverageFrom":[],"coverageDirectory":"/encrypted-uri/packages/ciphers/coverage","coverageProvider":"babel","coverageReporters":["json","text","lcov","clover"],"detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"expand":false,"findRelatedTests":false,"forceExit":false,"json":false,"lastCommit":false,"listTests":false,"logHeapUsage":false,"maxConcurrency":5,"maxWorkers":7,"noStackTrace":false,"nonFlagArgs":[],"notify":false,"notifyMode":"failure-change","onlyChanged":false,"onlyFailures":false,"openHandlesTimeout":1000,"passWithNoTests":false,"projects":[],"reporters":[["default",{}],["/encrypted-uri/packages/ciphers/node_modules/jest-html-reporters/index.js",{"publicPath":"../../docs/ciphers","filename":"test-report.html","expand":true}]],"rootDir":"/encrypted-uri/packages/ciphers","runTestsByPath":false,"seed":-1474621131,"skipFilter":false,"snapshotFormat":{"escapeString":false,"printBasicPrototype":false},"testFailureExitCode":1,"testPathPattern":"","testSequencer":"/encrypted-uri/packages/ciphers/node_modules/@jest/test-sequencer/build/index.js","updateSnapshot":"new","useStderr":false,"watch":false,"watchAll":false,"watchman":true,"workerThreads":false},"endTime":1708025718943,"_reporterOptions":{"publicPath":"../../docs/ciphers","filename":"test-report.html","expand":true,"pageTitle":"","hideIcon":false,"testCommand":"","openReport":false,"failureMessageOnly":0,"enableMergeData":false,"dataMergeLevel":1,"inlineSource":false,"urlForTestFiles":"","darkTheme":false,"includeConsoleLog":false,"stripSkippedTest":false},"logInfoMapping":{},"attachInfos":{}}) \ No newline at end of file diff --git a/docs/core/jest-html-reporters-attach/test-report/result.js b/docs/core/jest-html-reporters-attach/test-report/result.js index 13a8060..e3df61d 100644 --- a/docs/core/jest-html-reporters-attach/test-report/result.js +++ b/docs/core/jest-html-reporters-attach/test-report/result.js @@ -1 +1 @@ -window.jest_html_reporters_callback__({"numFailedTestSuites":0,"numFailedTests":0,"numPassedTestSuites":1,"numPassedTests":38,"numPendingTestSuites":0,"numPendingTests":0,"numRuntimeErrorTestSuites":0,"numTodoTests":0,"numTotalTestSuites":1,"numTotalTests":38,"startTime":1708024484189,"success":false,"testResults":[{"numFailingTests":0,"numPassingTests":38,"numPendingTests":0,"numTodoTests":0,"perfStats":{"end":1708024485420,"runtime":1188,"slow":false,"start":1708024484232},"testFilePath":"/encrypted-uri/packages/core/index.test.ts","failureMessage":null,"testResults":[{"ancestorTitles":["decode uri with default values"],"duration":2,"failureMessages":[],"fullName":"decode uri with default values [1] decode uri with default values not include","status":"passed","title":"[1] decode uri with default values not include"},{"ancestorTitles":["decode uri with default values"],"duration":1,"failureMessages":[],"fullName":"decode uri with default values [2] decode uri with some default values not include","status":"passed","title":"[2] decode uri with some default values not include"},{"ancestorTitles":["decode uri with default values"],"duration":0,"failureMessages":[],"fullName":"decode uri with default values [3] decode uri with some default values not include","status":"passed","title":"[3] decode uri with some default values not include"},{"ancestorTitles":["decode uri with default values"],"duration":1,"failureMessages":[],"fullName":"decode uri with default values [4] decode uri with default values not include","status":"passed","title":"[4] decode uri with default values not include"},{"ancestorTitles":["decode uri with default values"],"duration":1,"failureMessages":[],"fullName":"decode uri with default values [5] decode uri with some default values not include","status":"passed","title":"[5] decode uri with some default values not include"},{"ancestorTitles":["decode uri with default values"],"duration":0,"failureMessages":[],"fullName":"decode uri with default values [6] decode uri with some default values not include","status":"passed","title":"[6] decode uri with some default values not include"},{"ancestorTitles":["decode uri with customized values"],"duration":1,"failureMessages":[],"fullName":"decode uri with customized values [1] decode aes/gcm with customized values","status":"passed","title":"[1] decode aes/gcm with customized values"},{"ancestorTitles":["decode uri with customized values"],"duration":0,"failureMessages":[],"fullName":"decode uri with customized values [2] decode salsa20 with customized values","status":"passed","title":"[2] decode salsa20 with customized values"},{"ancestorTitles":["decode uri with customized values"],"duration":1,"failureMessages":[],"fullName":"decode uri with customized values [3] decode xchacha with customized values","status":"passed","title":"[3] decode xchacha with customized values"},{"ancestorTitles":["decode uri with customized values"],"duration":0,"failureMessages":[],"fullName":"decode uri with customized values [4] decode chacha12 with customized values","status":"passed","title":"[4] decode chacha12 with customized values"},{"ancestorTitles":["encode uri with configs using default values"],"duration":1,"failureMessages":[],"fullName":"encode uri with configs using default values [1] encode with default config with default values","status":"passed","title":"[1] encode with default config with default values"},{"ancestorTitles":["encode uri with configs using default values"],"duration":0,"failureMessages":[],"fullName":"encode uri with configs using default values [2] encode with default config with default values","status":"passed","title":"[2] encode with default config with default values"},{"ancestorTitles":["encode uri with configs using default values"],"duration":1,"failureMessages":[],"fullName":"encode uri with configs using default values [3] encode with default config with default values","status":"passed","title":"[3] encode with default config with default values"},{"ancestorTitles":["encode uri with configs using default values"],"duration":0,"failureMessages":[],"fullName":"encode uri with configs using default values [4] encode with default config with default values","status":"passed","title":"[4] encode with default config with default values"},{"ancestorTitles":["encode uri with configs using default values"],"duration":1,"failureMessages":[],"fullName":"encode uri with configs using default values [5] encode with default config with default values","status":"passed","title":"[5] encode with default config with default values"},{"ancestorTitles":["encode uri with configs using default values"],"duration":0,"failureMessages":[],"fullName":"encode uri with configs using default values [6] encode with default config with default values","status":"passed","title":"[6] encode with default config with default values"},{"ancestorTitles":["encode uri with configs using default values"],"duration":0,"failureMessages":[],"fullName":"encode uri with configs using default values [7] encode with default config with default values","status":"passed","title":"[7] encode with default config with default values"},{"ancestorTitles":["encode uri with configs using default values"],"duration":1,"failureMessages":[],"fullName":"encode uri with configs using default values [8] encode with default config with default values","status":"passed","title":"[8] encode with default config with default values"},{"ancestorTitles":["encode uri with customized values"],"duration":0,"failureMessages":[],"fullName":"encode uri with customized values [1] encode aes/gcm with customized values","status":"passed","title":"[1] encode aes/gcm with customized values"},{"ancestorTitles":["encode uri with customized values"],"duration":0,"failureMessages":[],"fullName":"encode uri with customized values [2] encode salsa20 with customized values","status":"passed","title":"[2] encode salsa20 with customized values"},{"ancestorTitles":["encode uri with customized values"],"duration":0,"failureMessages":[],"fullName":"encode uri with customized values [3] encode xchacha with customized values","status":"passed","title":"[3] encode xchacha with customized values"},{"ancestorTitles":["encode uri with customized values"],"duration":1,"failureMessages":[],"fullName":"encode uri with customized values [4] encode chacha12 with customized values","status":"passed","title":"[4] encode chacha12 with customized values"},{"ancestorTitles":["uri matcher"],"duration":0,"failureMessages":[],"fullName":"uri matcher [1] match valid encrypted uri","status":"passed","title":"[1] match valid encrypted uri"},{"ancestorTitles":["uri matcher"],"duration":0,"failureMessages":[],"fullName":"uri matcher [2] match valid encrypted uri","status":"passed","title":"[2] match valid encrypted uri"},{"ancestorTitles":["uri matcher"],"duration":1,"failureMessages":[],"fullName":"uri matcher [3] match valid encrypted uri","status":"passed","title":"[3] match valid encrypted uri"},{"ancestorTitles":["uri matcher"],"duration":0,"failureMessages":[],"fullName":"uri matcher [4] match valid encrypted uri","status":"passed","title":"[4] match valid encrypted uri"},{"ancestorTitles":["uri matcher"],"duration":0,"failureMessages":[],"fullName":"uri matcher [5] match valid encrypted uri","status":"passed","title":"[5] match valid encrypted uri"},{"ancestorTitles":["uri matcher"],"duration":1,"failureMessages":[],"fullName":"uri matcher [6] match valid encrypted uri","status":"passed","title":"[6] match valid encrypted uri"},{"ancestorTitles":["uri matcher"],"duration":0,"failureMessages":[],"fullName":"uri matcher [7] match valid encrypted uri","status":"passed","title":"[7] match valid encrypted uri"},{"ancestorTitles":["uri matcher"],"duration":0,"failureMessages":[],"fullName":"uri matcher [8] match valid encrypted uri","status":"passed","title":"[8] match valid encrypted uri"},{"ancestorTitles":["uri matcher"],"duration":0,"failureMessages":[],"fullName":"uri matcher [9] match valid encrypted uri","status":"passed","title":"[9] match valid encrypted uri"},{"ancestorTitles":["uri matcher"],"duration":1,"failureMessages":[],"fullName":"uri matcher [10] match valid encrypted uri","status":"passed","title":"[10] match valid encrypted uri"},{"ancestorTitles":["uri matcher"],"duration":0,"failureMessages":[],"fullName":"uri matcher [11] match valid encrypted uri","status":"passed","title":"[11] match valid encrypted uri"},{"ancestorTitles":["EncryptedURI object"],"duration":0,"failureMessages":[],"fullName":"EncryptedURI object [1] match valid encrypted uri","status":"passed","title":"[1] match valid encrypted uri"},{"ancestorTitles":["EncryptedURI object"],"duration":1,"failureMessages":[],"fullName":"EncryptedURI object [2] EncryptedURI must run decrypt for custom algorithm","status":"passed","title":"[2] EncryptedURI must run decrypt for custom algorithm"},{"ancestorTitles":["EncryptedURI object"],"duration":0,"failureMessages":[],"fullName":"EncryptedURI object [3] EncryptedURI must run encrypt for custom algorithm","status":"passed","title":"[3] EncryptedURI must run encrypt for custom algorithm"},{"ancestorTitles":["EncryptedURI getKDFConfig"],"duration":1,"failureMessages":[],"fullName":"EncryptedURI getKDFConfig [1] EncryptedURI get KDF config from KDF config","status":"passed","title":"[1] EncryptedURI get KDF config from KDF config"},{"ancestorTitles":["EncryptedURI getKDFConfig"],"duration":0,"failureMessages":[],"fullName":"EncryptedURI getKDFConfig [2] EncryptedURI get KDF config from decoded URI","status":"passed","title":"[2] EncryptedURI get KDF config from decoded URI"}]}],"config":{"bail":0,"changedFilesWithAncestor":false,"ci":false,"collectCoverage":false,"collectCoverageFrom":[],"coverageDirectory":"/encrypted-uri/packages/core/coverage","coverageProvider":"babel","coverageReporters":["json","text","lcov","clover"],"detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"expand":false,"findRelatedTests":false,"forceExit":false,"json":false,"lastCommit":false,"listTests":false,"logHeapUsage":false,"maxConcurrency":5,"maxWorkers":7,"noStackTrace":false,"nonFlagArgs":[],"notify":false,"notifyMode":"failure-change","onlyChanged":false,"onlyFailures":false,"openHandlesTimeout":1000,"passWithNoTests":false,"projects":[],"reporters":[["default",{}],["/encrypted-uri/packages/core/node_modules/jest-html-reporters/index.js",{"publicPath":"../../docs/core","filename":"test-report.html","expand":true}]],"rootDir":"/encrypted-uri/packages/core","runTestsByPath":false,"seed":868643592,"skipFilter":false,"snapshotFormat":{"escapeString":false,"printBasicPrototype":false},"testFailureExitCode":1,"testPathPattern":"","testSequencer":"/encrypted-uri/packages/core/node_modules/@jest/test-sequencer/build/index.js","updateSnapshot":"new","useStderr":false,"verbose":true,"watch":false,"watchAll":false,"watchman":true,"workerThreads":false},"endTime":1708024485430,"_reporterOptions":{"publicPath":"../../docs/core","filename":"test-report.html","expand":true,"pageTitle":"","hideIcon":false,"testCommand":"","openReport":false,"failureMessageOnly":0,"enableMergeData":false,"dataMergeLevel":1,"inlineSource":false,"urlForTestFiles":"","darkTheme":false,"includeConsoleLog":false,"stripSkippedTest":false},"logInfoMapping":{},"attachInfos":{}}) \ No newline at end of file +window.jest_html_reporters_callback__({"numFailedTestSuites":0,"numFailedTests":0,"numPassedTestSuites":1,"numPassedTests":46,"numPendingTestSuites":0,"numPendingTests":0,"numRuntimeErrorTestSuites":0,"numTodoTests":0,"numTotalTestSuites":1,"numTotalTests":46,"startTime":1708025708442,"success":false,"testResults":[{"numFailingTests":0,"numPassingTests":46,"numPendingTests":0,"numTodoTests":0,"perfStats":{"end":1708025709788,"runtime":1304,"slow":false,"start":1708025708484},"testFilePath":"/encrypted-uri/packages/core/index.test.ts","failureMessage":null,"testResults":[{"ancestorTitles":["decode uri with default values"],"duration":2,"failureMessages":[],"fullName":"decode uri with default values [1] decode uri with default values not include","status":"passed","title":"[1] decode uri with default values not include"},{"ancestorTitles":["decode uri with default values"],"duration":1,"failureMessages":[],"fullName":"decode uri with default values [2] decode uri with some default values not include","status":"passed","title":"[2] decode uri with some default values not include"},{"ancestorTitles":["decode uri with default values"],"duration":0,"failureMessages":[],"fullName":"decode uri with default values [3] decode uri with some default values not include","status":"passed","title":"[3] decode uri with some default values not include"},{"ancestorTitles":["decode uri with default values"],"duration":1,"failureMessages":[],"fullName":"decode uri with default values [4] decode uri with default values not include","status":"passed","title":"[4] decode uri with default values not include"},{"ancestorTitles":["decode uri with default values"],"duration":1,"failureMessages":[],"fullName":"decode uri with default values [5] decode uri with some default values not include","status":"passed","title":"[5] decode uri with some default values not include"},{"ancestorTitles":["decode uri with default values"],"duration":1,"failureMessages":[],"fullName":"decode uri with default values [6] decode uri with some default values not include","status":"passed","title":"[6] decode uri with some default values not include"},{"ancestorTitles":["decode uri with customized values"],"duration":0,"failureMessages":[],"fullName":"decode uri with customized values [1] decode aes/gcm with customized values","status":"passed","title":"[1] decode aes/gcm with customized values"},{"ancestorTitles":["decode uri with customized values"],"duration":1,"failureMessages":[],"fullName":"decode uri with customized values [2] decode salsa20 with customized values","status":"passed","title":"[2] decode salsa20 with customized values"},{"ancestorTitles":["decode uri with customized values"],"duration":0,"failureMessages":[],"fullName":"decode uri with customized values [3] decode xchacha with customized values","status":"passed","title":"[3] decode xchacha with customized values"},{"ancestorTitles":["decode uri with customized values"],"duration":1,"failureMessages":[],"fullName":"decode uri with customized values [4] decode chacha12 with customized values","status":"passed","title":"[4] decode chacha12 with customized values"},{"ancestorTitles":["encode uri with configs using default values"],"duration":0,"failureMessages":[],"fullName":"encode uri with configs using default values [1] encode with default config with default values","status":"passed","title":"[1] encode with default config with default values"},{"ancestorTitles":["encode uri with configs using default values"],"duration":0,"failureMessages":[],"fullName":"encode uri with configs using default values [2] encode with default config with default values","status":"passed","title":"[2] encode with default config with default values"},{"ancestorTitles":["encode uri with configs using default values"],"duration":0,"failureMessages":[],"fullName":"encode uri with configs using default values [3] encode with default config with default values","status":"passed","title":"[3] encode with default config with default values"},{"ancestorTitles":["encode uri with configs using default values"],"duration":1,"failureMessages":[],"fullName":"encode uri with configs using default values [4] encode with default config with default values","status":"passed","title":"[4] encode with default config with default values"},{"ancestorTitles":["encode uri with configs using default values"],"duration":0,"failureMessages":[],"fullName":"encode uri with configs using default values [5] encode with default config with default values","status":"passed","title":"[5] encode with default config with default values"},{"ancestorTitles":["encode uri with configs using default values"],"duration":1,"failureMessages":[],"fullName":"encode uri with configs using default values [6] encode with default config with default values","status":"passed","title":"[6] encode with default config with default values"},{"ancestorTitles":["encode uri with configs using default values"],"duration":0,"failureMessages":[],"fullName":"encode uri with configs using default values [7] encode with default config with default values","status":"passed","title":"[7] encode with default config with default values"},{"ancestorTitles":["encode uri with configs using default values"],"duration":0,"failureMessages":[],"fullName":"encode uri with configs using default values [8] encode with default config with default values","status":"passed","title":"[8] encode with default config with default values"},{"ancestorTitles":["encode uri with customized values"],"duration":1,"failureMessages":[],"fullName":"encode uri with customized values [1] encode aes/gcm with customized values","status":"passed","title":"[1] encode aes/gcm with customized values"},{"ancestorTitles":["encode uri with customized values"],"duration":0,"failureMessages":[],"fullName":"encode uri with customized values [2] encode salsa20 with customized values","status":"passed","title":"[2] encode salsa20 with customized values"},{"ancestorTitles":["encode uri with customized values"],"duration":0,"failureMessages":[],"fullName":"encode uri with customized values [3] encode xchacha with customized values","status":"passed","title":"[3] encode xchacha with customized values"},{"ancestorTitles":["encode uri with customized values"],"duration":1,"failureMessages":[],"fullName":"encode uri with customized values [4] encode chacha12 with customized values","status":"passed","title":"[4] encode chacha12 with customized values"},{"ancestorTitles":["uri matcher"],"duration":0,"failureMessages":[],"fullName":"uri matcher [1] match valid encrypted uri","status":"passed","title":"[1] match valid encrypted uri"},{"ancestorTitles":["uri matcher"],"duration":0,"failureMessages":[],"fullName":"uri matcher [2] match valid encrypted uri","status":"passed","title":"[2] match valid encrypted uri"},{"ancestorTitles":["uri matcher"],"duration":1,"failureMessages":[],"fullName":"uri matcher [3] match valid encrypted uri","status":"passed","title":"[3] match valid encrypted uri"},{"ancestorTitles":["uri matcher"],"duration":0,"failureMessages":[],"fullName":"uri matcher [4] match valid encrypted uri","status":"passed","title":"[4] match valid encrypted uri"},{"ancestorTitles":["uri matcher"],"duration":0,"failureMessages":[],"fullName":"uri matcher [5] match valid encrypted uri","status":"passed","title":"[5] match valid encrypted uri"},{"ancestorTitles":["uri matcher"],"duration":0,"failureMessages":[],"fullName":"uri matcher [6] match valid encrypted uri","status":"passed","title":"[6] match valid encrypted uri"},{"ancestorTitles":["uri matcher"],"duration":0,"failureMessages":[],"fullName":"uri matcher [7] match valid encrypted uri","status":"passed","title":"[7] match valid encrypted uri"},{"ancestorTitles":["uri matcher"],"duration":1,"failureMessages":[],"fullName":"uri matcher [8] match valid encrypted uri","status":"passed","title":"[8] match valid encrypted uri"},{"ancestorTitles":["uri matcher"],"duration":0,"failureMessages":[],"fullName":"uri matcher [9] match valid encrypted uri","status":"passed","title":"[9] match valid encrypted uri"},{"ancestorTitles":["uri matcher"],"duration":0,"failureMessages":[],"fullName":"uri matcher [10] match valid encrypted uri","status":"passed","title":"[10] match valid encrypted uri"},{"ancestorTitles":["uri matcher"],"duration":0,"failureMessages":[],"fullName":"uri matcher [11] match valid encrypted uri","status":"passed","title":"[11] match valid encrypted uri"},{"ancestorTitles":["EncryptedURI object"],"duration":0,"failureMessages":[],"fullName":"EncryptedURI object [1] match valid encrypted uri","status":"passed","title":"[1] match valid encrypted uri"},{"ancestorTitles":["EncryptedURI object"],"duration":1,"failureMessages":[],"fullName":"EncryptedURI object [2] EncryptedURI must run decrypt for custom algorithm","status":"passed","title":"[2] EncryptedURI must run decrypt for custom algorithm"},{"ancestorTitles":["EncryptedURI object"],"duration":0,"failureMessages":[],"fullName":"EncryptedURI object [3] EncryptedURI must run encrypt for custom algorithm","status":"passed","title":"[3] EncryptedURI must run encrypt for custom algorithm"},{"ancestorTitles":["EncryptedURI getKDFConfig"],"duration":1,"failureMessages":[],"fullName":"EncryptedURI getKDFConfig [1] EncryptedURI get KDF config from KDF config","status":"passed","title":"[1] EncryptedURI get KDF config from KDF config"},{"ancestorTitles":["EncryptedURI getKDFConfig"],"duration":0,"failureMessages":[],"fullName":"EncryptedURI getKDFConfig [2] EncryptedURI get KDF config from decoded URI","status":"passed","title":"[2] EncryptedURI get KDF config from decoded URI"},{"ancestorTitles":["EncryptedURI configs of defaults"],"duration":1,"failureMessages":[],"fullName":"EncryptedURI configs of defaults [1] EncryptedURI ignoreDefaults as false","status":"passed","title":"[1] EncryptedURI ignoreDefaults as false"},{"ancestorTitles":["EncryptedURI configs of defaults"],"duration":0,"failureMessages":[],"fullName":"EncryptedURI configs of defaults [2] EncryptedURI ignoreDefaults as true","status":"passed","title":"[2] EncryptedURI ignoreDefaults as true"},{"ancestorTitles":["EncryptedURI configs of defaults"],"duration":1,"failureMessages":[],"fullName":"EncryptedURI configs of defaults [3] EncryptedURI ignoreDefaultAlgorithm as true","status":"passed","title":"[3] EncryptedURI ignoreDefaultAlgorithm as true"},{"ancestorTitles":["EncryptedURI configs of defaults"],"duration":0,"failureMessages":[],"fullName":"EncryptedURI configs of defaults [4] EncryptedURI ignoreDefaultValues as true","status":"passed","title":"[4] EncryptedURI ignoreDefaultValues as true"},{"ancestorTitles":["EncryptedURI configs of defaults"],"duration":0,"failureMessages":[],"fullName":"EncryptedURI configs of defaults [5] EncryptedURI ignoreMandatoryParamName as true","status":"passed","title":"[5] EncryptedURI ignoreMandatoryParamName as true"},{"ancestorTitles":["EncryptedURI configs of defaults"],"duration":1,"failureMessages":[],"fullName":"EncryptedURI configs of defaults [6] EncryptedURI ignoreDefaultAlgorithm and ignoreDefaultValues as true","status":"passed","title":"[6] EncryptedURI ignoreDefaultAlgorithm and ignoreDefaultValues as true"},{"ancestorTitles":["EncryptedURI configs of defaults"],"duration":0,"failureMessages":[],"fullName":"EncryptedURI configs of defaults [7] EncryptedURI ignoreDefaultAlgorithm and ignoreMandatoryParamName as true","status":"passed","title":"[7] EncryptedURI ignoreDefaultAlgorithm and ignoreMandatoryParamName as true"},{"ancestorTitles":["EncryptedURI configs of defaults"],"duration":0,"failureMessages":[],"fullName":"EncryptedURI configs of defaults [8] EncryptedURI ignoreDefaultValues and ignoreMandatoryParamName as true","status":"passed","title":"[8] EncryptedURI ignoreDefaultValues and ignoreMandatoryParamName as true"}]}],"config":{"bail":0,"changedFilesWithAncestor":false,"ci":false,"collectCoverage":false,"collectCoverageFrom":[],"coverageDirectory":"/encrypted-uri/packages/core/coverage","coverageProvider":"babel","coverageReporters":["json","text","lcov","clover"],"detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"expand":false,"findRelatedTests":false,"forceExit":false,"json":false,"lastCommit":false,"listTests":false,"logHeapUsage":false,"maxConcurrency":5,"maxWorkers":7,"noStackTrace":false,"nonFlagArgs":[],"notify":false,"notifyMode":"failure-change","onlyChanged":false,"onlyFailures":false,"openHandlesTimeout":1000,"passWithNoTests":false,"projects":[],"reporters":[["default",{}],["/encrypted-uri/packages/core/node_modules/jest-html-reporters/index.js",{"publicPath":"../../docs/core","filename":"test-report.html","expand":true}]],"rootDir":"/encrypted-uri/packages/core","runTestsByPath":false,"seed":-924278045,"skipFilter":false,"snapshotFormat":{"escapeString":false,"printBasicPrototype":false},"testFailureExitCode":1,"testPathPattern":"","testSequencer":"/encrypted-uri/packages/core/node_modules/@jest/test-sequencer/build/index.js","updateSnapshot":"new","useStderr":false,"verbose":true,"watch":false,"watchAll":false,"watchman":true,"workerThreads":false},"endTime":1708025709792,"_reporterOptions":{"publicPath":"../../docs/core","filename":"test-report.html","expand":true,"pageTitle":"","hideIcon":false,"testCommand":"","openReport":false,"failureMessageOnly":0,"enableMergeData":false,"dataMergeLevel":1,"inlineSource":false,"urlForTestFiles":"","darkTheme":false,"includeConsoleLog":false,"stripSkippedTest":false},"logInfoMapping":{},"attachInfos":{}}) \ No newline at end of file diff --git a/packages/core/index.test.ts b/packages/core/index.test.ts index ec13475..92f5271 100755 --- a/packages/core/index.test.ts +++ b/packages/core/index.test.ts @@ -369,7 +369,6 @@ describe('EncryptedURI getKDFConfig', () => { }); - it('[2] EncryptedURI get KDF config from decoded URI', () => { const configs = EncryptedURI.getKDFParams({ algorithm: 'aes/cbc', @@ -387,7 +386,123 @@ describe('EncryptedURI getKDFConfig', () => { rounds: 32, derivateKeyLength: 32 }); - + }); +}); + +describe('EncryptedURI configs of defaults', () => { + it('[1] EncryptedURI ignoreDefaults as false', () => { + expect(new EncryptedURIParser({ + algorithm: 'aes/cbc', + cipher: 'cipherexample', + config: { + ignoreDefaults: false + }, + params: { + iv: '2345678wertyui' + } + }).encoded).toEqual('encrypted:aes/cbc?iv=2345678wertyui;cipherexample') + }); + + it('[2] EncryptedURI ignoreDefaults as true', () => { + expect(new EncryptedURIParser({ + algorithm: 'aes/cbc', + cipher: 'cipherexample', + config: { + ignoreDefaults: true + }, + params: { + iv: '2345678wertyui' + } + }).encoded).toEqual('encrypted:?2345678wertyui;cipherexample') }); + it('[3] EncryptedURI ignoreDefaultAlgorithm as true', () => { + expect(new EncryptedURIParser({ + algorithm: 'aes/cbc', + cipher: 'cipherexample', + config: { + ignoreDefaultAlgorithm: true, + ignoreDefaultValues: false, + ignoreMandatoryParamName: false + }, + params: { + iv: '2345678wertyui' + } + }).encoded).toEqual('encrypted:?iv=2345678wertyui;cipherexample') + }); + + it('[4] EncryptedURI ignoreDefaultValues as true', () => { + expect(new EncryptedURIParser({ + algorithm: 'aes/cbc', + cipher: 'cipherexample', + config: { + ignoreDefaultAlgorithm: false, + ignoreDefaultValues: true, + ignoreMandatoryParamName: false + }, + params: { + iv: '2345678wertyui' + } + }).encoded).toEqual('encrypted:aes/cbc?iv=2345678wertyui;cipherexample') + }); + + it('[5] EncryptedURI ignoreMandatoryParamName as true', () => { + expect(new EncryptedURIParser({ + algorithm: 'aes/cbc', + cipher: 'cipherexample', + config: { + ignoreDefaultAlgorithm: false, + ignoreDefaultValues: false, + ignoreMandatoryParamName: true + }, + params: { + iv: '2345678wertyui' + } + }).encoded).toEqual('encrypted:aes/cbc?2345678wertyui;cipherexample') + }); + + it('[6] EncryptedURI ignoreDefaultAlgorithm and ignoreDefaultValues as true', () => { + expect(new EncryptedURIParser({ + algorithm: 'aes/cbc', + cipher: 'cipherexample', + config: { + ignoreDefaultAlgorithm: true, + ignoreDefaultValues: true, + ignoreMandatoryParamName: false + }, + params: { + iv: '2345678wertyui' + } + }).encoded).toEqual('encrypted:?iv=2345678wertyui;cipherexample') + }); + + it('[7] EncryptedURI ignoreDefaultAlgorithm and ignoreMandatoryParamName as true', () => { + expect(new EncryptedURIParser({ + algorithm: 'aes/cbc', + cipher: 'cipherexample', + config: { + ignoreDefaultAlgorithm: true, + ignoreDefaultValues: false, + ignoreMandatoryParamName: true + }, + params: { + iv: '2345678wertyui' + } + }).encoded).toEqual('encrypted:?2345678wertyui;cipherexample') + }); + + it('[8] EncryptedURI ignoreDefaultValues and ignoreMandatoryParamName as true', () => { + expect(new EncryptedURIParser({ + algorithm: 'aes/cbc', + cipher: 'cipherexample', + config: { + ignoreDefaultAlgorithm: false, + ignoreDefaultValues: true, + ignoreMandatoryParamName: true + }, + params: { + iv: '2345678wertyui' + } + }).encoded).toEqual('encrypted:aes/cbc?2345678wertyui;cipherexample') + }); }); \ No newline at end of file diff --git a/packages/core/index.ts b/packages/core/index.ts index 5fbaee6..31a78ed 100755 --- a/packages/core/index.ts +++ b/packages/core/index.ts @@ -53,7 +53,7 @@ export type TEncryptedDefaultsConfig = { * @default true */ ignoreDefaults: boolean; -} & TEncryptedFullDefaultsConfig; +} | TEncryptedFullDefaultsConfig; export type TEncryptedURIKDFParams = { @@ -466,7 +466,7 @@ export class EncryptedURI { } else { return { ...defaultConfigs, - ...(config as TEncryptedFullDefaultsConfig) + ...config }; } }