Skip to content
This repository has been archived by the owner on Oct 1, 2023. It is now read-only.

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
igorshapiro committed Nov 23, 2021
1 parent eccc668 commit c0c06f8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 14 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ module.exports = {
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'prettier/@typescript-eslint',
],
root: true,
env: {
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
node-version: [16.x]
services:
elasticmq:
image: s12v/elasticmq
Expand Down
5 changes: 3 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}
"typescript.tsdk": "node_modules/typescript/lib",
"editor.formatOnPaste": true
}
17 changes: 7 additions & 10 deletions e2e/module.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,20 @@ import { SqsModule, SqsService } from '../lib';
import { SqsConsumerOptions, SqsProducerOptions } from '../lib/sqs.types';
import { Injectable } from '@nestjs/common';
import { SqsConsumerEventHandler, SqsMessageHandler } from '../lib/sqs.decorators';
import * as AWS from 'aws-sdk';
import { promisify } from 'util';
import waitForExpect from 'wait-for-expect';
import { Message, SQSClient as SQS } from '@aws-sdk/client-sqs';

const delay = promisify(setTimeout);
const SQS_ENDPOINT = process.env.SQS_ENDPOINT || 'http://localhost:9324';

enum TestQueue {
Test = 'test',
DLQ = 'test-dead',
}

const sqs = new AWS.SQS({
const sqs = new SQS({
apiVersion: '2012-11-05',
credentials: new AWS.Credentials('x', 'x'),
credentials: { accessKeyId: 'x', secretAccessKey: 'x'},
endpoint: SQS_ENDPOINT,
region: 'none',
});

Expand All @@ -37,8 +36,6 @@ const TestQueues: { [key in TestQueue]: SqsConsumerOptions | SqsProducerOptions
describe('SqsModule', () => {
let module: TestingModule;

describe.skip('register', () => {});

describe('registerAsync', () => {
let module: TestingModule;

Expand Down Expand Up @@ -78,17 +75,17 @@ describe('SqsModule', () => {

@SqsMessageHandler(TestQueue.Test)
// eslint-disable-next-line @typescript-eslint/no-empty-function
public async handleTestMessage(message: AWS.SQS.Message) {
public async handleTestMessage(message: Message) {
fakeProcessor(message);
}

@SqsConsumerEventHandler(TestQueue.Test, 'processing_error')
public handleErrorEvent(err: Error, message: AWS.SQS.Message) {
public handleErrorEvent(err: Error, message: Message) {
fakeErrorEventHandler(err, message);
}

@SqsMessageHandler(TestQueue.DLQ)
public async handleDLQMessage(message: AWS.SQS.Message) {
public async handleDLQMessage(message: Message) {
fakeDLQProcessor(message);
}
}
Expand Down

0 comments on commit c0c06f8

Please sign in to comment.