From 6889013921f79381eb35ad3a84527bbef0d16331 Mon Sep 17 00:00:00 2001 From: SnowCait Date: Sun, 14 Aug 2022 18:44:57 +0900 Subject: [PATCH] Separate tests --- __tests__/main.test.ts | 7 ------- __tests__/tweet.test.ts | 8 ++++++++ 2 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 __tests__/tweet.test.ts diff --git a/__tests__/main.test.ts b/__tests__/main.test.ts index 1e77782..6599d42 100644 --- a/__tests__/main.test.ts +++ b/__tests__/main.test.ts @@ -1,14 +1,7 @@ -import {tweet} from '../src/tweet' import * as process from 'process' import * as cp from 'child_process' import * as path from 'path' -test('tweet', async () => { - const text = Date.now().toString() - const response = await tweet(text) - await tweet(`in reply to ${text}`, [], response.id_str) -}) - // shows how the runner will run a javascript action with env / stdout protocol test('test runs', () => { process.env['INPUT_STATUS'] = new Date().toLocaleString('ja-JP') diff --git a/__tests__/tweet.test.ts b/__tests__/tweet.test.ts new file mode 100644 index 0000000..b812482 --- /dev/null +++ b/__tests__/tweet.test.ts @@ -0,0 +1,8 @@ +import 'dotenv/config' +import {tweet} from '../src/tweet' + +test('tweet', async () => { + const text = Date.now().toString() + const response = await tweet(text) + await tweet(`in reply to ${text}`, [], response.id_str) +})