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 b843a89..6068288 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":1708023519178,"success":false,"testResults":[{"numFailingTests":0,"numPassingTests":5,"numPendingTests":0,"numTodoTests":0,"perfStats":{"end":1708023603897,"runtime":84422,"slow":true,"start":1708023519475},"testFilePath":"/encrypted-uri/packages/ciphers/aes.test.ts","failureMessage":null,"testResults":[{"ancestorTitles":["success flow aes"],"duration":1485,"failureMessages":[],"fullName":"success flow aes cbc","status":"passed","title":"cbc"},{"ancestorTitles":["success flow aes"],"duration":46,"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":4,"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":1708023603960,"runtime":84467,"slow":true,"start":1708023519493},"testFilePath":"/encrypted-uri/packages/ciphers/kdf.test.ts","failureMessage":null,"testResults":[{"ancestorTitles":["kdf success flow"],"duration":1480,"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":28,"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":21,"failureMessages":[],"fullName":"kdf success flow [5] kdf with hasher sha384","status":"passed","title":"[5] kdf with hasher sha384"},{"ancestorTitles":["kdf success flow"],"duration":15,"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":11,"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":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":1708023605109,"runtime":85639,"slow":true,"start":1708023519470},"testFilePath":"/encrypted-uri/packages/ciphers/params.test.ts","failureMessage":null,"testResults":[{"ancestorTitles":["hashing customization"],"duration":1438,"failureMessages":[],"fullName":"hashing customization [3] kdf with hasher sha512","status":"passed","title":"[3] kdf with hasher sha512"},{"ancestorTitles":["hashing customization"],"duration":41,"failureMessages":[],"fullName":"hashing customization [4] kdf with hasher sha512_256","status":"passed","title":"[4] kdf with hasher sha512_256"},{"ancestorTitles":["hashing customization"],"duration":22,"failureMessages":[],"fullName":"hashing customization [5] kdf with hasher sha384","status":"passed","title":"[5] kdf with hasher sha384"},{"ancestorTitles":["hashing customization"],"duration":42,"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":4,"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":2,"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":1185,"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":-984749182,"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":1708023606008,"_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":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 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 b3f7308..13a8060 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":1708023511645,"success":false,"testResults":[{"numFailingTests":0,"numPassingTests":38,"numPendingTests":0,"numTodoTests":0,"perfStats":{"end":1708023515362,"runtime":3513,"slow":false,"start":1708023511849},"testFilePath":"/encrypted-uri/packages/core/index.test.ts","failureMessage":null,"testResults":[{"ancestorTitles":["decode uri with default values"],"duration":3,"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":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":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":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":1,"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":3,"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":1,"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":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":0,"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":1,"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":0,"failureMessages":[],"fullName":"uri matcher [8] match valid encrypted uri","status":"passed","title":"[8] match valid encrypted uri"},{"ancestorTitles":["uri matcher"],"duration":1,"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":1,"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":0,"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":1,"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":-1845586471,"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":1708023515368,"_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":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 diff --git a/packages/core/index.test.ts b/packages/core/index.test.ts index 6883004..ec13475 100755 --- a/packages/core/index.test.ts +++ b/packages/core/index.test.ts @@ -124,7 +124,7 @@ describe('encode uri with configs using default values', () => { params: { iv: '2345678wertyui' } - }).encoded).toEqual('encrypted:?iv=2345678wertyui;en1e3kj3e31jn2algoritmgenerateddata') + }).encoded).toEqual('encrypted:?2345678wertyui;en1e3kj3e31jn2algoritmgenerateddata') }); it('[3] encode with default config with default values', () => { @@ -161,7 +161,7 @@ describe('encode uri with configs using default values', () => { params: { iv: '2345678wertyui' } - }).encoded).toEqual('encrypted:aes?iv=2345678wertyui;en1e3kj3e31jn2algoritmgenerateddata') + }).encoded).toEqual('encrypted:aes?2345678wertyui;en1e3kj3e31jn2algoritmgenerateddata') }); it('[7] encode with default config with default values', () => { @@ -204,7 +204,7 @@ describe('encode uri with customized values', () => { // nonce no: '871232183987132082713' } - }).encoded).toEqual('encrypted:salsa20?no=871232183987132082713;en1e3kj3e31jn2algoritmgenerateddata') + }).encoded).toEqual('encrypted:salsa20?871232183987132082713;en1e3kj3e31jn2algoritmgenerateddata') }); it('[3] encode xchacha with customized values', () => { @@ -215,7 +215,7 @@ describe('encode uri with customized values', () => { // nonce no: '871232183987132082713' } - }).encoded).toEqual('encrypted:xchacha?no=871232183987132082713;en1e3kj3e31jn2algoritmgenerateddata') + }).encoded).toEqual('encrypted:xchacha?871232183987132082713;en1e3kj3e31jn2algoritmgenerateddata') }); it('[4] encode chacha12 with customized values', () => { @@ -226,7 +226,7 @@ describe('encode uri with customized values', () => { // nonce no: '871232183987132082713' } - }).encoded).toEqual('encrypted:chacha12?no=871232183987132082713;en1e3kj3e31jn2algoritmgenerateddata') + }).encoded).toEqual('encrypted:chacha12?871232183987132082713;en1e3kj3e31jn2algoritmgenerateddata') }); }); diff --git a/packages/core/index.ts b/packages/core/index.ts index 2abc70e..5fbaee6 100755 --- a/packages/core/index.ts +++ b/packages/core/index.ts @@ -247,8 +247,12 @@ class EncryptedURIEncoder { const params: TURIParams = {}; const kdfParams = EncryptedURIEncoder.castKDFConfigToParams(content); const contentParams: TURIParams = { ...content.params, ...kdfParams }; + const config = EncryptedURI.getConfigsOfDefaults(content.config); const paramsKeys = Object.keys(contentParams); - if (paramsKeys.length) { + + if (config.ignoreMandatoryParamName && paramsKeys.length === 1) { + return contentParams[paramsKeys[0]]; + } else if (paramsKeys.length) { paramsKeys.forEach(key => params[key] = contentParams[key]); } else { return content.queryString || '';