Skip to content
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

chore: Update eslint #153

Merged
merged 4 commits into from
Mar 30, 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
2 changes: 1 addition & 1 deletion __tests__/stubs/commonExpectedXml.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Clave>50601042400020692014200100001010000000002100000001</Clave>
<CodigoActividad>000004</CodigoActividad>
<NumeroConsecutivo>00100001010000000002</NumeroConsecutivo>
<FechaEmision>2024-04-01T06:00:00.000Z</FechaEmision>
<FechaEmision>2024-04-01T00:00:00.000Z</FechaEmision>
<Emisor>
<Nombre>Nombre Receptor</Nombre>
<Identificacion>
Expand Down
2 changes: 1 addition & 1 deletion __tests__/tests/ATV/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Create Document (Invoice) should create document and generate a correct command 1`] = `"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48RmFjdHVyYUVsZWN0cm9uaWNhIHhtbG5zPSJodHRwczovL2Nkbi5jb21wcm9iYW50ZXNlbGVjdHJvbmljb3MuZ28uY3IveG1sLXNjaGVtYXMvdjQuMy9mYWN0dXJhRWxlY3Ryb25pY2EiIHhtbG5zOmRzPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwLzA5L3htbGRzaWcjIiB4bWxuczp4c2Q9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hIiB4bWxuczp4c2k9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4c2k6c2NoZ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ZlbnRhPjxUb3RhbERlc2N1ZW50b3M+MDwvVG90YWxEZXNjdWVudG9zPjxUb3RhbFZlbnRhTmV0YT4xMDwvVG90YWxWZW50YU5ldGE+PFRvdGFsSW1wdWVzdG8+MS4zPC9Ub3RhbEltcHVlc3RvPjxUb3RhbENvbXByb2JhbnRlPjExLjM8L1RvdGFsQ29tcHJvYmFudGU+PC9SZXN1bWVuRmFjdHVyYT48L0ZhY3R1cmFFbGVjdHJvbmljYT4="`;
exports[`Create Document (Invoice) should create document and generate a correct command 1`] = `"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48RmFjdHVyYUVsZWN0cm9uaWNhIHhtbG5zPSJodHRwczovL2Nkbi5jb21wcm9iYW50ZXNlbGVjdHJvbmljb3MuZ28uY3IveG1sLXNjaGVtYXMvdjQuMy9mYWN0dXJhRWxlY3Ryb25pY2EiIHhtbG5zOmRzPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwLzA5L3htbGRzaWcjIiB4bWxuczp4c2Q9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hIiB4bWxuczp4c2k9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4c2k6c2NoZW1hTG9jYXRpb249Imh0dHBzOi8vY2RuLmNvbXByb2JhbnRlc2VsZWN0cm9uaWNvcy5nby5jci94bWwtc2NoZW1hcy92NC4zL2ZhY3R1cmFFbGVjdHJvbmljYSBodHRwczovL3d3dy5oYWNpZW5kYS5nby5jci9BVFYvQ29tcHJvYmFudGVFbGVjdHJvbmljby9kb2NzL2VzcXVlbWFzLzIwMTYvdjQuMy9GYWN0dXJhRWxlY3Ryb25pY2FfVjQuMy54c2QiPjxDbGF2ZT41MDYwMTA0MjQwMDAyMDY5MjAxNDIwMDEwMDAwMTAxMDAwMDAwMDAwMjEwMDAwMDAwMTwvQ2xhdmU+PENvZGlnb0FjdGl2aWRhZD4wMDAwMDQ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G8+MS4zPC9Nb250bz48L0ltcHVlc3RvPjxNb250b1RvdGFsTGluZWE+MTEuMzwvTW9udG9Ub3RhbExpbmVhPjwvTGluZWFEZXRhbGxlPjwvRGV0YWxsZVNlcnZpY2lvPjxSZXN1bWVuRmFjdHVyYT48Q29kaWdvVGlwb01vbmVkYT48Q29kaWdvTW9uZWRhPkNSQzwvQ29kaWdvTW9uZWRhPjxUaXBvQ2FtYmlvPjU4NS42OTwvVGlwb0NhbWJpbz48L0NvZGlnb1RpcG9Nb25lZGE+PFRvdGFsU2VydkdyYXZhZG9zPjA8L1RvdGFsU2VydkdyYXZhZG9zPjxUb3RhbFNlcnZFeGVudG9zPjA8L1RvdGFsU2VydkV4ZW50b3M+PFRvdGFsTWVyY2FuY2lhc0dyYXZhZGFzPjEwPC9Ub3RhbE1lcmNhbmNpYXNHcmF2YWRhcz48VG90YWxNZXJjYW5jaWFzRXhlbnRhcz4wPC9Ub3RhbE1lcmNhbmNpYXNFeGVudGFzPjxUb3RhbEdyYXZhZG8+MTA8L1RvdGFsR3JhdmFkbz48VG90YWxFeGVudG8+MDwvVG90YWxFeGVudG8+PFRvdGFsRXhvbmVyYWRvPjA8L1RvdGFsRXhvbmVyYWRvPjxUb3RhbFZlbnRhPjEwPC9Ub3RhbFZlbnRhPjxUb3RhbERlc2N1ZW50b3M+MDwvVG90YWxEZXNjdWVudG9zPjxUb3RhbFZlbnRhTmV0YT4xMDwvVG90YWxWZW50YU5ldGE+PFRvdGFsSW1wdWVzdG8+MS4zPC9Ub3RhbEltcHVlc3RvPjxUb3RhbENvbXByb2JhbnRlPjExLjM8L1RvdGFsQ29tcHJvYmFudGU+PC9SZXN1bWVuRmFjdHVyYT48L0ZhY3R1cmFFbGVjdHJvbmljYT4="`;
4 changes: 2 additions & 2 deletions __tests__/tests/ATV/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fs from 'fs'
import { ATV } from "@src/ATV"

Check failure on line 2 in __tests__/tests/ATV/index.test.ts

View workflow job for this annotation

GitHub Actions / run-on-ubuntu (18)

Strings must use singlequote

Check failure on line 2 in __tests__/tests/ATV/index.test.ts

View workflow job for this annotation

GitHub Actions / run-on-ubuntu (20)

Strings must use singlequote

Check failure on line 2 in __tests__/tests/ATV/index.test.ts

View workflow job for this annotation

GitHub Actions / run-on-window (18)

Strings must use singlequote

Check failure on line 2 in __tests__/tests/ATV/index.test.ts

View workflow job for this annotation

GitHub Actions / run-on-window (20)

Strings must use singlequote
import 'jest-xml-matcher'
import { createDocumentInputStub } from "@test/stubs/createDocument.stub"
const fakePem = fs.readFileSync('__tests__/stubs/dummyKeys/client-identity.p12', 'binary')
Expand All @@ -9,7 +9,7 @@
describe('Create Document (Invoice)', () => {
beforeAll(() => {
jest.useFakeTimers();
jest.setSystemTime(new Date(2024, 3, 1));
jest.setSystemTime(new Date(2024, 3, 1, 0, 0, 0, 0));
})

it('should create document and generate a correct command', async () => {
Expand All @@ -28,7 +28,7 @@
})
expect(createdDoc.command.data).toMatchObject({
clave: '50601042400020692014200100001010000000002100000001',
fecha: '2024-04-01T06:00:00.000Z',
fecha: '2024-04-01T00:00:00.000Z',
emisor: { tipoIdentificacion: '01', numeroIdentificacion: '206920142' },
receptor: { tipoIdentificacion: '02', numeroIdentificacion: '3102759157' }
})
Expand Down
5 changes: 5 additions & 0 deletions jest-setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = async function (globalConfig, projectConfig) {
process.env.TZ = 'UTC';
};


3 changes: 2 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ module.exports = {
collectCoverage: true,
collectCoverageFrom: [
'src/**/*.{ts,js}'
]
],
globalSetup: './jest-setup.js'
}
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,23 @@
"devDependencies": {
"@types/jest": "^29.5",
"@types/node": "^14.14.39",
"@typescript-eslint/eslint-plugin": "^2.3.0",
"@typescript-eslint/parser": "^2.3.0",
"@typescript-eslint/eslint-plugin": "^7.4.0",
"@typescript-eslint/parser": "^7.4.0",
"dotenv-cli": "^4.0.0",
"eslint": "^6.4.0",
"eslint-config-standard": "^14.1.0",
"eslint-plugin-import": "^2.18.2",
"eslint": "^8.57.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.3.1",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-standard": "^5.0.0",
"jest": "^29.7",
"jest-xml-matcher": "^1.2.0",
"nodemon": "^2.0.19",
"ts-jest": "^29.1",
"ts-node": "10.9.1",
"tsc": "^1.20150623.0",
"tsconfig-paths": "^3.9.0",
"tsconfig-paths": "^4.2.0",
"typescript": "^4.2.4"
},
"dependencies": {
Expand Down
Loading
Loading