You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am new to encore and currently exploring by doing the tutorials, in the Building an Uptime Monitor add a test code the $expected inside the string should verify that $site is ${expected ? "up" : "down"} has reference error, I can skip it ofc but just wanna inform that the docs has invalid code and I want to see the working version since it seems a good way to loop the tests. Here is the code
import{describe,expect,test}from"vitest";import{ping}from"./ping";describe("ping",()=>{test.each([// Test both with and without "https://"{site: "google.com",expected: true},{site: "https://encore.dev",expected: true},// 4xx and 5xx should considered down.{site: "https://not-a-real-site.xyz",expected: false},// Invalid URLs should be considered down.{site: "invalid://scheme",expected: false},])(`should verify that $site is ${expected ? "up" : "down"}`,async({ site, expected })=>{constresp=awaitping({url: site});expect(resp.up).toBe(expected);},);});
some other details:
I follow exactly like the tutorials since 1st step including the command for the starter create project, so I expected things to works fine. Thank you.
The text was updated successfully, but these errors were encountered:
I am new to encore and currently exploring by doing the tutorials, in the
Building an Uptime Monitor
add a test code the$expected
inside the stringshould verify that $site is ${expected ? "up" : "down"}
has reference error, I can skip it ofc but just wanna inform that the docs has invalid code and I want to see the working version since it seems a good way to loop the tests. Here is the codehere is the link to the tutorials docs
encore dev
here is the error
some other details:
I follow exactly like the tutorials since 1st step including the command for the starter create project, so I expected things to works fine. Thank you.
The text was updated successfully, but these errors were encountered: