From b81dbba2d4c9c56c3702b539e7f013f16298d89a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9E=A5=EC=A7=80=ED=9B=88?= Date: Wed, 2 Mar 2022 01:07:43 +0900 Subject: [PATCH] =?UTF-8?q?test():=20e2e=EB=8A=94=20=ED=85=8C=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=EC=97=90=EC=84=9C=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 6 ++--- src/core/string/extractInnerText.ts | 25 ------------------- src/core/string/extractInnerTexts.ts | 24 ------------------ src/core/string/index.ts | 2 -- .../the-camp/the-camp.service.e2e.spec.ts | 3 ++- 5 files changed, 5 insertions(+), 55 deletions(-) delete mode 100644 src/core/string/extractInnerText.ts delete mode 100644 src/core/string/extractInnerTexts.ts delete mode 100644 src/core/string/index.ts diff --git a/package.json b/package.json index f311f17..ae6ee7b 100644 --- a/package.json +++ b/package.json @@ -7,9 +7,9 @@ "author": "Whitekiwi ", "scripts": { "lint": "eslint \"{{src}/**/*.ts,**.js}\" --fix", - "test": "jest --forceExit", - "test:watch": "jest --watch", - "test:cov": "jest --coverage --forceExit", + "test": "jest --forceExit --testPathIgnorePatterns='.e2e.*'", + "test:watch": "jest --watch --testPathIgnorePatterns='.e2e.*'", + "test:cov": "jest --coverage --forceExit --testPathIgnorePatterns='.e2e.*'", "prebuild": "rimraf ./lib", "build": "yarn run prebuild && tsc --project tsconfig.build.json", "script": "ts-node .scripts/index.ts" diff --git a/src/core/string/extractInnerText.ts b/src/core/string/extractInnerText.ts deleted file mode 100644 index 3057fb7..0000000 --- a/src/core/string/extractInnerText.ts +++ /dev/null @@ -1,25 +0,0 @@ -export function extractInnerText( - target: string, - lefts: string[], - right: string, -): string { - let beforeStartIdx = -1; - let startIdx = -1; - for (const left of lefts) { - startIdx = target.indexOf(left, beforeStartIdx); - - if (startIdx < 0) { - break; - } - - startIdx += left.length; - beforeStartIdx = startIdx; - } - - const endIdx = target.indexOf(right, startIdx); - if (startIdx < 0 || endIdx < 0) { - return ''; - } - - return target.substring(startIdx, endIdx); -} diff --git a/src/core/string/extractInnerTexts.ts b/src/core/string/extractInnerTexts.ts deleted file mode 100644 index 3f608b8..0000000 --- a/src/core/string/extractInnerTexts.ts +++ /dev/null @@ -1,24 +0,0 @@ -export function extractInnerTexts( - target: string, - left: string, - right: string, -): string[] { - const extractedTexts = []; - let offset = 0; - - while (target.includes(left) && target.includes(right)) { - const startIdx = target.indexOf(left, offset); - const endIdx = target.indexOf(right, startIdx); - - if (startIdx === -1 || endIdx === -1) { - break; - } - - const extractedText = target.substring(startIdx + left.length, endIdx); - - extractedTexts.push(extractedText); - offset = endIdx + right.length; - } - - return extractedTexts; -} diff --git a/src/core/string/index.ts b/src/core/string/index.ts deleted file mode 100644 index 3ed63fd..0000000 --- a/src/core/string/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './extractInnerText'; -export * from './extractInnerTexts'; diff --git a/src/services/the-camp/the-camp.service.e2e.spec.ts b/src/services/the-camp/the-camp.service.e2e.spec.ts index 6e1b867..efaa4d5 100644 --- a/src/services/the-camp/the-camp.service.e2e.spec.ts +++ b/src/services/the-camp/the-camp.service.e2e.spec.ts @@ -2,7 +2,8 @@ import { theCampService } from './the-camp.service'; describe.skip('TheCampService e2e', () => { it('성공', async () => { - const session = await theCampService.login({ + // const session = await theCampService.login({ + await theCampService.login({ id: '', password: '', });