diff --git a/src/index.spec.ts b/src/index.spec.ts new file mode 100644 index 0000000000..ef755e40d3 --- /dev/null +++ b/src/index.spec.ts @@ -0,0 +1,10 @@ +import * as cheerio from './index'; +import * as statics from './static'; + +describe('index', () => { + it('should export all static methods', () => { + for (const key of Object.keys(statics) as (keyof typeof statics)[]) { + expect(cheerio[key]).toBe(statics[key]); + } + }); +}); diff --git a/src/index.ts b/src/index.ts index fb5f421119..09c4ec5c2d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -83,6 +83,8 @@ import { filters, pseudos, aliases } from 'cheerio-select'; */ export const select = { filters, pseudos, aliases }; +export * from './static'; + import * as staticMethods from './static'; /**