1+ import { FastifyInstance } from 'fastify' ;
12import { init } from '../lib/server' ;
23
34describe ( "Testing stocazzo's" , ( ) => {
4- let server ;
5+ let server : FastifyInstance ;
56
67 beforeEach ( async ( ) => {
78 server = await init ( ) ;
89 } ) ;
910
1011 it ( 'GET /' , async ( ) => {
1112 const options = {
12- method : 'GET' ,
13+ method : 'GET' as const ,
1314 url : '/' ,
1415 } ;
1516
@@ -20,7 +21,7 @@ describe("Testing stocazzo's", () => {
2021
2122 it ( 'GET / with request body' , async ( ) => {
2223 const options = {
23- method : 'GET' ,
24+ method : 'GET' as const ,
2425 url : '/?q=chi%20e' ,
2526 } ;
2627
@@ -32,7 +33,7 @@ describe("Testing stocazzo's", () => {
3233
3334 it ( 'GET /caps' , async ( ) => {
3435 const options = {
35- method : 'GET' ,
36+ method : 'GET' as const ,
3637 url : '/caps' ,
3738 } ;
3839
@@ -43,7 +44,7 @@ describe("Testing stocazzo's", () => {
4344
4445 it ( 'GET /caps with request body' , async ( ) => {
4546 const options = {
46- method : 'GET' ,
47+ method : 'GET' as const ,
4748 url : '/caps?q=chi%20e' ,
4849 } ;
4950
@@ -55,7 +56,7 @@ describe("Testing stocazzo's", () => {
5556
5657 it ( 'GET /camel' , async ( ) => {
5758 const options = {
58- method : 'GET' ,
59+ method : 'GET' as const ,
5960 url : '/camel' ,
6061 } ;
6162
@@ -66,7 +67,7 @@ describe("Testing stocazzo's", () => {
6667
6768 it ( 'GET /ascii' , async ( ) => {
6869 const options = {
69- method : 'GET' ,
70+ method : 'GET' as const ,
7071 url : '/ascii' ,
7172 } ;
7273
@@ -77,7 +78,7 @@ describe("Testing stocazzo's", () => {
7778
7879 it ( 'GET /snake' , async ( ) => {
7980 const options = {
80- method : 'GET' ,
81+ method : 'GET' as const ,
8182 url : '/snake' ,
8283 } ;
8384
@@ -88,7 +89,7 @@ describe("Testing stocazzo's", () => {
8889
8990 it ( 'GET /snake with big=true' , async ( ) => {
9091 const options = {
91- method : 'GET' ,
92+ method : 'GET' as const ,
9293 url : '/snake?big=1' ,
9394 } ;
9495
@@ -99,7 +100,7 @@ describe("Testing stocazzo's", () => {
99100
100101 it ( 'GET /sto-conte' , async ( ) => {
101102 const options = {
102- method : 'GET' ,
103+ method : 'GET' as const ,
103104 url : '/sto-conte' ,
104105 } ;
105106
@@ -110,7 +111,7 @@ describe("Testing stocazzo's", () => {
110111
111112 it ( 'GET /sto-conte with big=true' , async ( ) => {
112113 const options = {
113- method : 'GET' ,
114+ method : 'GET' as const ,
114115 url : '/sto-conte?big=1' ,
115116 } ;
116117
@@ -121,7 +122,7 @@ describe("Testing stocazzo's", () => {
121122
122123 it ( 'GET /varg' , async ( ) => {
123124 const options = {
124- method : 'GET' ,
125+ method : 'GET' as const ,
125126 url : '/varg' ,
126127 } ;
127128
@@ -132,7 +133,7 @@ describe("Testing stocazzo's", () => {
132133
133134 it ( 'GET /varg with big enabled' , async ( ) => {
134135 const options = {
135- method : 'GET' ,
136+ method : 'GET' as const ,
136137 url : '/varg?big=1' ,
137138 } ;
138139
0 commit comments