Skip to content

Commit

Permalink
chore: updating deps
Browse files Browse the repository at this point in the history
  • Loading branch information
joelwmale committed Mar 28, 2024
1 parent 0de33a6 commit c54aaa0
Show file tree
Hide file tree
Showing 779 changed files with 589,542 additions and 1,024,782 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
dist/
dist
node_nodules
16 changes: 13 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
{
"env": {
"commonjs": true,
"es6": true,
"es2021": true,
"jest": true,
"node": true
},
"extends": "eslint:recommended",
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018
"ecmaVersion": 2021,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"@typescript-eslint/no-explicit-any": "off"
}
}
38 changes: 19 additions & 19 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
import { http } from '../src/http'
import {http} from '../src/http'
import {expect, test} from '@jest/globals'

test('it makes a post request', async () => {
const url = 'https://httpbin.org/post'
const body = '{"hello": "world"}'
const res = await http.make(url, body)
expect(res.status).toBe(200)
const url = 'https://httpbin.org/post'
const body = '{"hello": "world"}'
const res = await http.make(url, body)
expect(res.status).toBe(200)
})

test('it makes a post request with insecure', async () => {
const url = 'https://httpbin.org/post'
const body = '{"hello": "world"}'
const insecure = true
const res = await http.make(url, body, null, insecure)
expect(res.status).toBe(200)
const url = 'https://httpbin.org/post'
const body = '{"hello": "world"}'
const insecure = true
const res = await http.make(url, body, null, insecure)
expect(res.status).toBe(200)
})

test('it makes a post request with headers', async () => {
const url = 'https://httpbin.org/post'
const body = '{"hello": "world"}'
const headers = '{"Content-Type": "application/json"}'
const res = await http.make(url, body, headers)
expect(res.status).toBe(200)
const url = 'https://httpbin.org/post'
const body = '{"hello": "world"}'
const headers = '{"Content-Type": "application/json"}'
const res = await http.make(url, body, headers)
expect(res.status).toBe(200)
})

test('it doesnt require a body', async () => {
const url = 'https://httpbin.org/post'
const res = await http.make(url, null)
expect(res.status).toBe(200)
})
const url = 'https://httpbin.org/post'
const res = await http.make(url, null)
expect(res.status).toBe(200)
})
Loading

0 comments on commit c54aaa0

Please sign in to comment.