Skip to content

test(logger): switch e2e tests to vitest #3148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions packages/logger/jest.config.cjs

This file was deleted.

8 changes: 4 additions & 4 deletions packages/logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"test:unit": "vitest --run tests/unit",
"test:unit:coverage": "vitest --run tests/unit --coverage.enabled --coverage.thresholds.100 --coverage.include='src/**'",
"test:unit:types": "echo 'Not Implemented'",
"test:e2e:nodejs18x": "RUNTIME=nodejs18x jest --group=e2e",
"test:e2e:nodejs20x": "RUNTIME=nodejs20x jest --group=e2e",
"test:e2e": "jest --group=e2e",
"watch": "jest --watch --group=unit",
"test:unit:watch": "vitest tests/unit",
"test:e2e:nodejs18x": "RUNTIME=nodejs18x vitest --run tests/e2e",
"test:e2e:nodejs20x": "RUNTIME=nodejs20x vitest --run tests/e2e",
"test:e2e": "vitest --run tests/e2e",
"build:cjs": "tsc --build tsconfig.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json",
"build:esm": "tsc --build tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json",
"build": "npm run build:esm & npm run build:cjs",
Expand Down
6 changes: 1 addition & 5 deletions packages/logger/tests/e2e/basicFeatures.middy.test.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
/**
* Test logger basic features
*
* @group e2e/logger/basicFeatures
*/
import { join } from 'node:path';
import {
TestInvocationLogs,
TestStack,
invokeFunction,
} from '@aws-lambda-powertools/testing-utils';
import type { APIGatewayAuthorizerResult } from 'aws-lambda';
import { afterAll, beforeAll, describe, expect, it } from 'vitest';
import { LoggerTestNodejsFunction } from '../helpers/resources.js';
import {
RESOURCE_NAME_PREFIX,
Expand Down
6 changes: 1 addition & 5 deletions packages/logger/tests/e2e/childLogger.manual.test.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
/**
* Test logger child logger
*
* @group e2e/logger/childLogger
*/
import { join } from 'node:path';
import {
TestInvocationLogs,
TestStack,
invokeFunction,
} from '@aws-lambda-powertools/testing-utils';
import { afterAll, beforeAll, describe, expect, it } from 'vitest';
import { LoggerTestNodejsFunction } from '../helpers/resources.js';
import {
RESOURCE_NAME_PREFIX,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
/**
* Test logger basic features
*
* @group e2e/logger/logEventEnvVarSetting
*/
import { join } from 'node:path';
import {
TestInvocationLogs,
TestStack,
invokeFunction,
} from '@aws-lambda-powertools/testing-utils';
import { afterAll, beforeAll, describe, expect, it } from 'vitest';
import { LoggerTestNodejsFunction } from '../helpers/resources.js';
import {
RESOURCE_NAME_PREFIX,
Expand Down
6 changes: 1 addition & 5 deletions packages/logger/tests/e2e/sampleRate.decorator.test.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
/**
* Test logger sample rate feature
*
* @group e2e/logger/sampleRate
*/
import { randomUUID } from 'node:crypto';
import { join } from 'node:path';
import {
TestInvocationLogs,
TestStack,
invokeFunction,
} from '@aws-lambda-powertools/testing-utils';
import { afterAll, beforeAll, describe, expect, it } from 'vitest';
import { LoggerTestNodejsFunction } from '../helpers/resources.js';
import {
RESOURCE_NAME_PREFIX,
Expand Down