{"id":13673270,"url":"https://github.com/allain/expect","last_synced_at":"2025-10-20T20:34:33.396Z","repository":{"id":50959385,"uuid":"182336989","full_name":"allain/expect","owner":"allain","description":"DEPRECATED helpers for writing jest like expect tests in deno","archived":true,"fork":false,"pushed_at":"2024-12-24T14:17:44.000Z","size":71,"stargazers_count":45,"open_issues_count":0,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-19T00:18:48.966Z","etag":null,"topics":["deprecated"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/allain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-19T23:28:42.000Z","updated_at":"2024-12-24T14:18:05.000Z","dependencies_parsed_at":"2024-06-20T11:02:29.875Z","dependency_job_id":"f8b57ce4-b292-4729-982d-81223316f07e","html_url":"https://github.com/allain/expect","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allain%2Fexpect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allain%2Fexpect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allain%2Fexpect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allain%2Fexpect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/allain","download_url":"https://codeload.github.com/allain/expect/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243858892,"owners_count":20359257,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deprecated"],"created_at":"2024-08-02T10:00:32.332Z","updated_at":"2025-10-20T20:34:33.084Z","avatar_url":"https://github.com/allain.png","language":"TypeScript","readme":"# DEPRECATED\n\nI recommend you use [jsr:@std/expect](https://jsr.io/@std/expect) instead.\n\n# expect\n\n[![][ghw badge]][ghw link]\n\nA deno implementation of `expect` in order to write tests in a more `jest` like style.\n\n```typescript\nimport { expect } from 'https://deno.land/x/expect/mod.ts'\n\nexpect(10).toEqual(10)\nexpect(Promise.resolve(20)).resolves.toEqual(20)\n```\n\n```typescript\ninterface Expected {\n  toBe(candidate: any, msg?: string): void\n  toEqual(candidate: any, msg?: string): void\n  toBeTruthy(msg?: string): void\n  toBeFalsy(msg?: string): void\n  toBeDefined(msg?: string): void\n  toBeInstanceOf(clazz: any, msg?: string): void\n  toBeUndefined(msg?: string): void\n  toBeNull(msg?: string): void\n  toBeNaN(msg?: string): void\n  toMatch(pattern: RegExp | string): void\n  toHaveProperty(propName: string, msg?: string): void\n  toHaveLength(length: number, msg?: string): void\n  toContain(item: any, msg?: string): void\n  toThrow(error?: RegExp | string, msg?: string): void\n\n  // comparison\n  toBeGreaterThan(number: number, msg?: string): void\n  toBeGreaterThanOrEqual(number: number, msg?: string): void\n  toBeLessThan(number: number, msg?: string): void\n  toBeLessThanOrEqual(number: number, msg?: string): void\n\n  // mock calls\n  toHaveBeenCalled(): void\n  toHaveBeenCalledTimes(times: number): void\n  toHaveBeenCalledWith(...args: any[]): void\n  toHaveBeenLastCalledWith(...args: any[]): void\n  toHaveBeenNthCalledWith(nth: number, ...args: any[]): void\n  toHaveReturnedWith(expected: any): void\n  toHaveReturned(): void\n  toHaveLastReturnedWith(expected: any): void\n  toHaveReturnedTimes(times: number): void\n  toHaveNthReturnedWith(nth: number, expected: any): void\n\n  not: Expected\n  resolves: Expected\n  rejects: Expected\n}\n```\n\n[ghw badge]: https://img.shields.io/github/workflow/status/allain/expect/ci\n[ghw link]: https://github.com/allain/expect/actions?query=workflow%3Aci\n","funding_links":[],"categories":["基础设施","Uncategorized","Modules","模块精选"],"sub_categories":["Deno 源","Uncategorized","Online Playgrounds","Testing","Assistants","测试"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallain%2Fexpect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fallain%2Fexpect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallain%2Fexpect/lists"}