This commit is contained in:
kankys committed 2026-09-13 11:24:09 +02:00
1 parent 207c50f51d
commit e5c6276bab
55 files changed
+28732

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
# Secrets
.env*
# Dependencies
node_modules
# OS files
.DS_Store
Thumbs.db
+43
View File
@@ -0,0 +1,43 @@
info:
name: ShortingHat
type: http
seq: 1
http:
method: GET
url: http://localhost:3000/sortingHat
auth: inherit
runtime:
scripts:
- type: tests
code: |-
const status = res.getStatus()
const body = res.getBody()
test("Status code is 200", function() {
expect(status).to.equal(200);
});
test("Response should contain sortingHat key", function(){
expect(body).to.contain.key("sortingHatSays")
})
test("Message from sorting hat should not be empty", function(){
expect(res.getBody().sortingHatSays).not.to.be.empty
})
test("Message from house should not be empty", function(){
expect(res.getBody().house).not.to.be.empty
})
test("House is one of Gryffindor, Slytherin, Ravenclaw, Hufflepuff",function(){
expect(res.getBody().house).is.oneOf(["Gryffindor", "Slytherin", "Ravenclaw", "Hufflepuff" ])
})
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
forwardAuthorizationHeader: false
+26
View File
@@ -0,0 +1,26 @@
opencollection: 1.0.0
info:
name: PotterAPI
config:
proxy:
inherit: true
config:
protocol: http
hostname: ""
port: ""
auth:
username: ""
password: ""
bypassProxy: ""
request:
headers:
- name: localhost
value: http://localhost:3000/
bundled: false
extensions:
bruno:
ignore:
- node_modules
- .git