Skip to content

Commit

Permalink
style: run prettier:fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ngshiheng committed Sep 22, 2022
1 parent dfde52f commit 0ec84a1
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions scripts/test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import http from 'k6/http'
import { check, group, sleep } from 'k6'
import http from 'k6/http'

export const options = {
duration: '10s',
Expand All @@ -21,21 +21,14 @@ export default function () {

check(res, {
'is status 200': (r) => r.status === 200,
'verify homepage text': (r) =>
r.body.includes(
'A URL shortener POC built using Cloudflare Worker'
),
'verify homepage text': (r) => r.body.includes('A URL shortener POC built using Cloudflare Worker'),
})

sleep(1) // second
})

group('visit rest endpoint', function () {
const res = http.post(
`${BASE_URL}/api/url`,
JSON.stringify({ originalUrl: DUMMY_ORIGINAL_URL }),
{ headers: { 'Content-Type': 'application/json' } }
)
const res = http.post(`${BASE_URL}/api/url`, JSON.stringify({ originalUrl: DUMMY_ORIGINAL_URL }), { headers: { 'Content-Type': 'application/json' } })

check(res, {
'is status 200': (r) => r.status === 200,
Expand Down

0 comments on commit 0ec84a1

Please sign in to comment.