repo
stringlengths
7
64
file_url
stringlengths
81
338
file_path
stringlengths
5
257
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:25:31
2026-01-05 01:50:38
truncated
bool
2 classes
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/helpers/debug.ts
test/scripts/helpers/debug.ts
import { stub } from 'sinon'; import { inspectObject, log } from '../../../lib/plugins/helper/debug'; import { inspect } from 'util'; describe('debug', () => { it('inspect simple object', () => { const obj = { foo: 'bar' }; inspectObject(obj).should.eql(inspect(obj)); }); it('inspect circular object', (...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/helpers/tagcloud.ts
test/scripts/helpers/tagcloud.ts
import BluebirdPromise from 'bluebird'; import Hexo from '../../../lib/hexo'; import tagcloudHelper from '../../../lib/plugins/helper/tagcloud'; import chai from 'chai'; const should = chai.should(); type TagcloudHelperParams = Parameters<typeof tagcloudHelper>; type TagcloudHelperReturn = ReturnType<typeof tagcloudHel...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/helpers/list_tags.ts
test/scripts/helpers/list_tags.ts
import Hexo from '../../../lib/hexo'; import listTagsHelper from '../../../lib/plugins/helper/list_tags'; type ListTagsHelperParams = Parameters<typeof listTagsHelper>; type ListTagsHelperReturn = ReturnType<typeof listTagsHelper>; describe('list_tags', () => { const hexo = new Hexo(__dirname); const Post = hexo.m...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/helpers/favicon_tag.ts
test/scripts/helpers/favicon_tag.ts
import Hexo from '../../../lib/hexo'; import faviconTag from '../../../lib/plugins/helper/favicon_tag'; type faviconTagParams = Parameters<typeof faviconTag>; type faviconTagReturn = ReturnType<typeof faviconTag>; describe('favicon_tag', () => { const hexo = new Hexo(__dirname); const ctx = { config: hexo.con...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/helpers/gravatar.ts
test/scripts/helpers/gravatar.ts
import crypto from 'crypto'; import gravatarHelper from '../../../lib/plugins/helper/gravatar'; describe('gravatar', () => { function md5(str) { return crypto.createHash('md5').update(str).digest('hex'); } const gravatar = gravatarHelper; const email = 'abc@abc.com'; const hash = md5(email); it('def...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/helpers/partial.ts
test/scripts/helpers/partial.ts
import pathFn from 'path'; import { mkdirs, writeFile, rmdir } from 'hexo-fs'; import BluebirdPromise from 'bluebird'; import Hexo from '../../../lib/hexo'; import fragmentCache from '../../../lib/plugins/helper/fragment_cache'; import partialHelper from '../../../lib/plugins/helper/partial'; import chai from 'chai'; c...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/helpers/fragment_cache.ts
test/scripts/helpers/fragment_cache.ts
import Hexo from '../../../lib/hexo'; import fragmentCache from '../../../lib/plugins/helper/fragment_cache'; describe('fragment_cache', () => { const hexo = new Hexo(__dirname); const fragment_cache = fragmentCache(hexo); fragment_cache.call({cache: true}, 'foo', () => 123); it('cache enabled', () => { ...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/helpers/paginator.ts
test/scripts/helpers/paginator.ts
import { url_for } from 'hexo-util'; import Hexo from '../../../lib/hexo'; import paginatorHelper from '../../../lib/plugins/helper/paginator'; type PaginatorHelperParams = Parameters<typeof paginatorHelper>; type PaginatorHelperReturn = ReturnType<typeof paginatorHelper>; describe('paginator', () => { const hexo = ...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/helpers/css.ts
test/scripts/helpers/css.ts
import * as cheerio from 'cheerio'; import Hexo from '../../../lib/hexo'; import cssHelper from '../../../lib/plugins/helper/css'; type CssHelperParams = Parameters<typeof cssHelper>; type CssHelperReturn = ReturnType<typeof cssHelper>; describe('css', () => { const hexo = new Hexo(__dirname); const ctx: any = { ...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/helpers/list_categories.ts
test/scripts/helpers/list_categories.ts
import Hexo from '../../../lib/hexo'; import listCategoriesHelper from '../../../lib/plugins/helper/list_categories'; type ListCategoriesHelperParams = Parameters<typeof listCategoriesHelper>; type ListCategoriesHelperReturn = ReturnType<typeof listCategoriesHelper>; describe('list_categories', () => { const hexo = ...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/helpers/url_for.ts
test/scripts/helpers/url_for.ts
import urlForHelper from '../../../lib/plugins/helper/url_for'; import relativeUrlHelper from '../../../lib/plugins/helper/relative_url'; type UrlForHelperParams = Parameters<typeof urlForHelper>; type UrlForHelperReturn = ReturnType<typeof urlForHelper>; describe('url_for', () => { const ctx: any = { config: { ...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/helpers/js.ts
test/scripts/helpers/js.ts
import * as cheerio from 'cheerio'; import Hexo from '../../../lib/hexo'; import jsHelper from '../../../lib/plugins/helper/js'; type JsHelperParams = Parameters<typeof jsHelper>; type JsHelperReturn = ReturnType<typeof jsHelper>; describe('js', () => { const hexo = new Hexo(__dirname); const ctx: any = { con...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/helpers/markdown.ts
test/scripts/helpers/markdown.ts
import Hexo from '../../../lib/hexo'; import renderHelper from '../../../lib/plugins/helper/render'; import markdownHelper from '../../../lib/plugins/helper/markdown'; type MarkdownHelperParams = Parameters<typeof markdownHelper>; type MarkdownHelperReturn = ReturnType<typeof markdownHelper>; describe('markdown', () =...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/helpers/feed_tag.ts
test/scripts/helpers/feed_tag.ts
import feedTag from '../../../lib/plugins/helper/feed_tag'; import chai from 'chai'; const should = chai.should(); type FeedTagParams = Parameters<typeof feedTag>; type FeedTagReturn = ReturnType<typeof feedTag>; describe('feed_tag', () => { const ctx: any = { config: { title: 'Hexo', url: 'http://ex...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/helpers/list_archives.ts
test/scripts/helpers/list_archives.ts
import Hexo from '../../../lib/hexo'; import listArchivesHelper from '../../../lib/plugins/helper/list_archives'; type ListArchivesHelperParams = Parameters<typeof listArchivesHelper>; type ListArchivesHelperReturn = ReturnType<typeof listArchivesHelper>; describe('list_archives', () => { const hexo = new Hexo(__dir...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/helpers/meta_generator.ts
test/scripts/helpers/meta_generator.ts
import Hexo from '../../../lib/hexo'; import metaGeneratorHelper from '../../../lib/plugins/helper/meta_generator'; import chai from 'chai'; const should = chai.should(); type MetaGeneratorHelperParams = Parameters<typeof metaGeneratorHelper>; type MetaGeneratorHelperReturn = ReturnType<typeof metaGeneratorHelper>; de...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/helpers/full_url_for.ts
test/scripts/helpers/full_url_for.ts
import fullUrlForHelper from '../../../lib/plugins/helper/full_url_for'; type FullUrlForHelperParams = Parameters<typeof fullUrlForHelper>; type FullUrlForHelperReturn = ReturnType<typeof fullUrlForHelper>; describe('full_url_for', () => { const ctx: any = { config: { url: 'https://example.com' } }; const f...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/helpers/mail_to.ts
test/scripts/helpers/mail_to.ts
import Hexo from '../../../lib/hexo'; import mailToHelper from '../../../lib/plugins/helper/mail_to'; type MailToHelperParams = Parameters<typeof mailToHelper>; type MailToHelperReturn = ReturnType<typeof mailToHelper>; describe('mail_to', () => { const hexo = new Hexo(__dirname); const ctx: any = { config: h...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/helpers/search_form.ts
test/scripts/helpers/search_form.ts
import searchFormHelper from '../../../lib/plugins/helper/search_form'; type SearchFormHelperParams = Parameters<typeof searchFormHelper>; type SearchFormHelperReturn = ReturnType<typeof searchFormHelper>; describe('search_form', () => { const searchForm: (...args: SearchFormHelperParams) => SearchFormHelperReturn =...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/helpers/link_to.ts
test/scripts/helpers/link_to.ts
import Hexo from '../../../lib/hexo'; import linkToHelper from '../../../lib/plugins/helper/link_to'; type LinkToHelperParams = Parameters<typeof linkToHelper>; type LinkToHelperReturn = ReturnType<typeof linkToHelper>; describe('link_to', () => { const hexo = new Hexo(__dirname); const ctx: any = { config: h...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/helpers/open_graph.ts
test/scripts/helpers/open_graph.ts
import moment from 'moment'; import * as cheerio from 'cheerio'; import { encodeURL, htmlTag as tag } from 'hexo-util'; import defaultConfig from '../../../lib/hexo/default_config'; import Hexo from '../../../lib/hexo'; import openGraph from '../../../lib/plugins/helper/open_graph'; import { post as isPost } from '../....
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/helpers/list_posts.ts
test/scripts/helpers/list_posts.ts
import Hexo from '../../../lib/hexo'; import listPostsHelper from '../../../lib/plugins/helper/list_posts'; type ListPostsHelperParams = Parameters<typeof listPostsHelper>; type ListPostsHelperReturn = ReturnType<typeof listPostsHelper>; describe('list_posts', () => { const hexo = new Hexo(__dirname); const Post =...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/helpers/escape_html.ts
test/scripts/helpers/escape_html.ts
import { escapeHTML } from '../../../lib/plugins/helper/format'; describe('escape_html', () => { it('default', () => { escapeHTML('<p class="foo">Hello "world".</p>').should.eql('&lt;p class&#x3D;&quot;foo&quot;&gt;Hello &quot;world&quot;.&lt;&#x2F;p&gt;'); }); it('str must be a string', () => { escapeH...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/helpers/date.ts
test/scripts/helpers/date.ts
import moment from 'moment-timezone'; import { useFakeTimers } from 'sinon'; import Hexo from '../../../lib/hexo'; import { date as dateHelper, date_xml, relative_date, time as timeHelper, full_date, time_tag, toMomentLocale } from '../../../lib/plugins/helper/date'; type DateHelperParams = Parameters<typeof dateHelper...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/renderers/json.ts
test/scripts/renderers/json.ts
import r from '../../../lib/plugins/renderer/json'; describe('json', () => { it('normal', () => { const data = { foo: 1, bar: { baz: 2 } }; r({text: JSON.stringify(data)}).should.eql(data); }); });
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/renderers/plain.ts
test/scripts/renderers/plain.ts
import r from '../../../lib/plugins/renderer/plain'; describe('plain', () => { it('normal', () => { r({text: '123'}).should.eql('123'); }); });
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/renderers/yaml.ts
test/scripts/renderers/yaml.ts
import r from '../../../lib/plugins/renderer/yaml'; describe('yaml', () => { it('normal', () => { r({text: 'foo: 1'}).should.eql({foo: 1}); }); it('escape', () => { const body = [ 'foo: 1', 'bar:', '\tbaz: 3' ].join('\n'); r({text: body}).should.eql({ foo: 1, bar: ...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/renderers/nunjucks.ts
test/scripts/renderers/nunjucks.ts
import r from '../../../lib/plugins/renderer/nunjucks'; import { dirname, join } from 'path'; import chai from 'chai'; const _should = chai.should(); describe('nunjucks', () => { const fixturePath = join(dirname(dirname(__dirname)), 'fixtures', 'hello.njk'); it('render from string', () => { const body = [ ...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/hexo/render.ts
test/scripts/hexo/render.ts
import { writeFile, rmdir } from 'hexo-fs'; import { join } from 'path'; import yaml from 'js-yaml'; import { spy, assert as sinonAssert } from 'sinon'; import Hexo from '../../../lib/hexo'; import chai from 'chai'; const should = chai.should(); describe('Render', () => { const hexo = new Hexo(join(__dirname, 'rende...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/hexo/load_config.ts
test/scripts/hexo/load_config.ts
import { join, sep, resolve } from 'path'; import { writeFile, unlink, mkdirs, rmdir } from 'hexo-fs'; import { makeRe } from 'micromatch'; import loadConfig from '../../../lib/hexo/load_config'; import defaultConfig from '../../../lib/hexo/default_config'; import Hexo from '../../../lib/hexo'; describe('Load config',...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/hexo/scaffold.ts
test/scripts/hexo/scaffold.ts
import { join } from 'path'; import { exists, readFile, rmdir, unlink, writeFile } from 'hexo-fs'; import Hexo from '../../../lib/hexo'; import chai from 'chai'; const should = chai.should(); describe('Scaffold', () => { const hexo = new Hexo(__dirname); const scaffold = hexo.scaffold; const scaffoldDir = hexo.s...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/hexo/router.ts
test/scripts/hexo/router.ts
import BluebirdPromise from 'bluebird'; import { Readable } from 'stream'; import { join } from 'path'; import crypto from 'crypto'; import { createReadStream } from 'hexo-fs'; import { spy, assert as sinonAssert } from 'sinon'; import { readStream } from '../../util'; import Router from '../../../lib/hexo/router'; imp...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/hexo/post.ts
test/scripts/hexo/post.ts
import { join } from 'path'; import moment from 'moment'; import { readFile, mkdirs, unlink, rmdir, writeFile, exists, stat, listDir } from 'hexo-fs'; import { spy, useFakeTimers } from 'sinon'; import { parse as yfm } from 'hexo-front-matter'; import { expected, content, expected_disable_nunjucks, content_for_issue_33...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
true
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/hexo/multi_config_path.ts
test/scripts/hexo/multi_config_path.ts
import pathFn from 'path'; import osFn from 'os'; import { writeFileSync, rmdirSync, unlinkSync, readFileSync } from 'hexo-fs'; import yml from 'js-yaml'; import Hexo from '../../../lib/hexo'; import multiConfigPath from '../../../lib/hexo/multi_config_path'; describe('config flag handling', () => { const hexo = new...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/hexo/load_plugins.ts
test/scripts/hexo/load_plugins.ts
import { join, dirname } from 'path'; import { writeFile, mkdir, rmdir, unlink } from 'hexo-fs'; import Hexo from '../../../lib/hexo'; import loadPlugins from '../../../lib/hexo/load_plugins'; import BluebirdPromise from 'bluebird'; import chai from 'chai'; import { spy } from 'sinon'; const should = chai.should(); de...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/hexo/update_package.ts
test/scripts/hexo/update_package.ts
import { join } from 'path'; import { readFile, unlink, writeFile } from 'hexo-fs'; import Hexo from '../../../lib/hexo'; import updatePkg from '../../../lib/hexo/update_package'; describe('Update package.json', () => { const hexo = new Hexo(__dirname, {silent: true}); const packagePath = join(hexo.base_dir, 'pack...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/hexo/load_theme_config.ts
test/scripts/hexo/load_theme_config.ts
import { join } from 'path'; import { mkdirs, unlink, writeFile, rmdir } from 'hexo-fs'; import Hexo from '../../../lib/hexo'; import chai from 'chai'; const should = chai.should(); describe('Load alternate theme config', () => { const hexo = new Hexo(join(__dirname, 'config_test'), {silent: true}); const loadThem...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/hexo/hexo.ts
test/scripts/hexo/hexo.ts
import { sep, join } from 'path'; import { mkdirs, rmdir, unlink, writeFile } from 'hexo-fs'; import BluebirdPromise from 'bluebird'; import { spy } from 'sinon'; import { readStream } from '../../util'; import { full_url_for } from 'hexo-util'; import Hexo from '../../../lib/hexo'; import chai from 'chai'; const shoul...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/hexo/locals.ts
test/scripts/hexo/locals.ts
import Locals from '../../../lib/hexo/locals'; import chai from 'chai'; const should = chai.should(); describe('Locals', () => { const locals = new Locals(); it('get() - name must be a string', () => { // @ts-expect-error should.throw(() => locals.get(), 'name must be a string!'); }); it('set() - fun...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/hexo/load_database.ts
test/scripts/hexo/load_database.ts
import { join } from 'path'; import Hexo from '../../../lib/hexo'; import { exists, mkdirs, rmdir, unlink, writeFile } from 'hexo-fs'; import loadDatabase from '../../../lib/hexo/load_database'; describe('Load database', () => { const hexo = new Hexo(join(__dirname, 'db_test'), {silent: true}); const dbPath = hexo...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/hexo/validate_config.ts
test/scripts/hexo/validate_config.ts
import { spy } from 'sinon'; import Hexo from '../../../lib/hexo'; import validateConfig from '../../../lib/hexo/validate_config'; import defaultConfig from '../../../lib/hexo/default_config'; import chai from 'chai'; const should = chai.should(); describe('Validate config', () => { const hexo = new Hexo(); let lo...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/console/config.ts
test/scripts/console/config.ts
import { mkdirs, readFile, rmdir, unlink, writeFile } from 'hexo-fs'; import { join } from 'path'; import { load } from 'js-yaml'; import { stub, assert as sinonAssert } from 'sinon'; import Hexo from '../../../lib/hexo'; import configConsole from '../../../lib/plugins/console/config'; type OriginalParams = Parameters<...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/console/render.ts
test/scripts/console/render.ts
import { mkdirs, readFile, rmdir, unlink, writeFile } from 'hexo-fs'; import { join } from 'path'; import BluebirdPromise from 'bluebird'; import { spy, SinonSpy } from 'sinon'; import Hexo from '../../../lib/hexo'; import renderConsole from '../../../lib/plugins/console/render'; type OriginalParams = Parameters<typeof...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/console/publish.ts
test/scripts/console/publish.ts
import { exists, mkdirs, readFile, rmdir, unlink } from 'hexo-fs'; import moment from 'moment'; import { join } from 'path'; import BluebirdPromise from 'bluebird'; import { useFakeTimers, spy, SinonSpy, SinonFakeTimers } from 'sinon'; import Hexo from '../../../lib/hexo'; import publishConsole from '../../../lib/plugi...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/console/list_tags.ts
test/scripts/console/list_tags.ts
import BluebirdPromise from 'bluebird'; import { stub, assert as sinonAssert } from 'sinon'; import Hexo from '../../../lib/hexo'; import listTag from '../../../lib/plugins/console/list/tag'; type OriginalParams = Parameters<typeof listTag>; type OriginalReturn = ReturnType<typeof listTag>; describe('Console list', ()...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/console/list_post.ts
test/scripts/console/list_post.ts
import BluebirdPromise from 'bluebird'; import { stub, assert as sinonAssert } from 'sinon'; import Hexo from '../../../lib/hexo'; import listPost from '../../../lib/plugins/console/list/post'; type OriginalParams = Parameters<typeof listPost>; type OriginalReturn = ReturnType<typeof listPost>; describe('Console list'...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/console/list_categories.ts
test/scripts/console/list_categories.ts
import BluebirdPromise from 'bluebird'; import { stub, assert as sinonAssert } from 'sinon'; import Hexo from '../../../lib/hexo'; import listCategory from '../../../lib/plugins/console/list/category'; type OriginalParams = Parameters<typeof listCategory>; type OriginalReturn = ReturnType<typeof listCategory>; describ...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/console/migrate.ts
test/scripts/console/migrate.ts
import { spy, assert as sinonAssert, stub, SinonSpy } from 'sinon'; import Hexo from '../../../lib/hexo'; import migrateConsole from '../../../lib/plugins/console/migrate'; type OriginalParams = Parameters<typeof migrateConsole>; type OriginalReturn = ReturnType<typeof migrateConsole>; describe('migrate', () => { co...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/console/list_route.ts
test/scripts/console/list_route.ts
import { stub, assert as sinonAssert } from 'sinon'; import Hexo from '../../../lib/hexo'; import listRoute from '../../../lib/plugins/console/list/route'; type OriginalParams = Parameters<typeof listRoute>; type OriginalReturn = ReturnType<typeof listRoute>; describe('Console list', () => { const hexo = new Hexo(__...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/console/list_page.ts
test/scripts/console/list_page.ts
import { stub, assert as sinonAssert } from 'sinon'; import Hexo from '../../../lib/hexo'; import listPage from '../../../lib/plugins/console/list/page'; type OriginalParams = Parameters<typeof listPage>; type OriginalReturn = ReturnType<typeof listPage>; describe('Console list', () => { const hexo = new Hexo(); c...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/console/generate.ts
test/scripts/console/generate.ts
import { join } from 'path'; import { emptyDir, exists, mkdirs, readFile, rmdir, stat, unlink, writeFile } from 'hexo-fs'; import BluebirdPromise from 'bluebird'; import { spy } from 'sinon'; import chai from 'chai'; const should = chai.should(); import Hexo from '../../../lib/hexo'; import generateConsole from '../../...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/console/list.ts
test/scripts/console/list.ts
import { spy, stub, assert as sinonAssert, SinonSpy } from 'sinon'; import BluebirdPromise from 'bluebird'; import Hexo from '../../../lib/hexo'; import listConsole from '../../../lib/plugins/console/list'; type OriginalParams = Parameters<typeof listConsole>; type OriginalReturn = ReturnType<typeof listConsole>; desc...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/console/new.ts
test/scripts/console/new.ts
import { exists, mkdirs, readFile, rmdir, unlink } from 'hexo-fs'; import moment from 'moment'; import { join } from 'path'; import BluebirdPromise from 'bluebird'; import { useFakeTimers, spy, SinonSpy } from 'sinon'; import Hexo from '../../../lib/hexo'; import newConsole from '../../../lib/plugins/console/new'; type...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/console/deploy.ts
test/scripts/console/deploy.ts
import { exists, mkdirs, readFile, rmdir, writeFile } from 'hexo-fs'; import { join } from 'path'; import { spy, stub, assert as sinonAssert } from 'sinon'; import chai from 'chai'; const should = chai.should(); import Hexo from '../../../lib/hexo'; import deployConsole from '../../../lib/plugins/console/deploy'; type ...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/console/clean.ts
test/scripts/console/clean.ts
import { exists, mkdirs, unlink, writeFile } from 'hexo-fs'; import Hexo from '../../../lib/hexo'; import cleanConsole from '../../../lib/plugins/console/clean'; type OriginalParams = Parameters<typeof cleanConsole>; type OriginalReturn = ReturnType<typeof cleanConsole>; describe('clean', () => { let hexo: Hexo, cle...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/tags/blockquote.ts
test/scripts/tags/blockquote.ts
import Hexo from '../../../lib/hexo'; import tagBlockquote from '../../../lib/plugins/tag/blockquote'; describe('blockquote', () => { const hexo = new Hexo(__dirname); const blockquote = tagBlockquote(hexo); before(() => hexo.init().then(() => hexo.loadPlugin(require.resolve('hexo-renderer-marked')))); const...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/tags/link.ts
test/scripts/tags/link.ts
import * as cheerio from 'cheerio'; import link from '../../../lib/plugins/tag/link'; describe('link', () => { it('text + url', () => { const $ = cheerio.load(link('Click here to Google https://google.com'.split(' '))); $('a').attr('href')!.should.eql('https://google.com/'); $('a').html()!.should.eql('C...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/tags/code.ts
test/scripts/tags/code.ts
import { escapeHTML, highlight as utilHighlight, prismHighlight } from 'hexo-util'; import * as cheerio from 'cheerio'; import Hexo from '../../../lib/hexo'; import tagCode from '../../../lib/plugins/tag/code'; describe('code', () => { const hexo = new Hexo(); require('../../../lib/plugins/highlight/')(hexo); co...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/tags/asset_link.ts
test/scripts/tags/asset_link.ts
import BluebirdPromise from 'bluebird'; import Hexo from '../../../lib/hexo'; import tagAssetLink from '../../../lib/plugins/tag/asset_link'; import chai from 'chai'; const should = chai.should(); describe('asset_link', () => { const hexo = new Hexo(__dirname); const assetLinkTag = tagAssetLink(hexo); const Post...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/tags/url_for.ts
test/scripts/tags/url_for.ts
import * as cheerio from 'cheerio'; import tagUrlFor from '../../../lib/plugins/tag/url_for'; describe('url_for', () => { const ctx: any = { config: { url: 'https://example.com' } }; const urlForTag = tagUrlFor(ctx); const urlFor = args => urlForTag(args.split(' ')); it('should encode path', () => { ...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/tags/img.ts
test/scripts/tags/img.ts
import * as cheerio from 'cheerio'; import pathFn from 'path'; import Hexo from '../../../lib/hexo'; import tagImg from '../../../lib/plugins/tag/img'; describe('img', () => { const hexo = new Hexo(pathFn.join(__dirname, 'img_test')); const img = tagImg(hexo); before(() => hexo.init()); it('src', () => { ...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/tags/iframe.ts
test/scripts/tags/iframe.ts
import * as cheerio from 'cheerio'; import iframe from '../../../lib/plugins/tag/iframe'; describe('iframe', () => { it('url', () => { const $ = cheerio.load(iframe(['https://zespia.tw'])); $('iframe').attr('src')!.should.eql('https://zespia.tw/'); $('iframe').attr('width')!.should.eql('100%'); $('i...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/tags/asset_img.ts
test/scripts/tags/asset_img.ts
import BluebirdPromise from 'bluebird'; import Hexo from '../../../lib/hexo'; import tagAssetImg from '../../../lib/plugins/tag/asset_img'; import chai from 'chai'; const should = chai.should(); describe('asset_img', () => { const hexo = new Hexo(__dirname); const assetImgTag = tagAssetImg(hexo); const Post = he...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/tags/full_url_for.ts
test/scripts/tags/full_url_for.ts
import * as cheerio from 'cheerio'; import tagFullUrlFor from '../../../lib/plugins/tag/full_url_for'; describe('full_url_for', () => { const ctx: any = { config: { url: 'https://example.com' } }; const fullUrlForTag = tagFullUrlFor(ctx); const fullUrlFor = args => fullUrlForTag(args.split(' ')); it('n...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/tags/include_code.ts
test/scripts/tags/include_code.ts
import { join } from 'path'; import { rmdir, writeFile } from 'hexo-fs'; import { escapeHTML, highlight, prismHighlight } from 'hexo-util'; import BluebirdPromise from 'bluebird'; import Hexo from '../../../lib/hexo'; import tagIncludeCode from '../../../lib/plugins/tag/include_code'; import chai from 'chai'; const sho...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/tags/asset_path.ts
test/scripts/tags/asset_path.ts
import BluebirdPromise from 'bluebird'; import Hexo from '../../../lib/hexo'; import tagAssetPath from '../../../lib/plugins/tag/asset_path'; import chai from 'chai'; const should = chai.should(); describe('asset_path', () => { const hexo = new Hexo(__dirname); const assetPathTag = tagAssetPath(hexo); const Post...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/tags/post_link.ts
test/scripts/tags/post_link.ts
import Hexo from '../../../lib/hexo'; import tagPostLink from '../../../lib/plugins/tag/post_link'; import chai from 'chai'; const should = chai.should(); describe('post_link', () => { const hexo = new Hexo(__dirname); const postLink = tagPostLink(hexo); const Post = hexo.model('Post'); hexo.config.permalink ...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/tags/pullquote.ts
test/scripts/tags/pullquote.ts
import Hexo from '../../../lib/hexo'; import tagPullquote from '../../../lib/plugins/tag/pullquote'; describe('pullquote', () => { const hexo = new Hexo(__dirname); const pullquote = tagPullquote(hexo); before(() => hexo.init().then(() => hexo.loadPlugin(require.resolve('hexo-renderer-marked')))); it('defaul...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/tags/post_path.ts
test/scripts/tags/post_path.ts
import Hexo from '../../../lib/hexo'; import tagPostPath from '../../../lib/plugins/tag/post_path'; import chai from 'chai'; const should = chai.should(); describe('post_path', () => { const hexo = new Hexo(__dirname); const postPath = tagPostPath(hexo); const Post = hexo.model('Post'); hexo.config.permalink ...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/models/page.ts
test/scripts/models/page.ts
import { join } from 'path'; import { deepMerge, full_url_for } from 'hexo-util'; import Hexo from '../../../lib/hexo'; import defaults from '../../../lib/hexo/default_config'; import chai from 'chai'; const should = chai.should(); describe('Page', () => { const hexo = new Hexo(); const Page = hexo.model('Page'); ...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/models/post_asset.ts
test/scripts/models/post_asset.ts
import { join, posix } from 'path'; import Hexo from '../../../lib/hexo'; import defaults from '../../../lib/hexo/default_config'; describe('PostAsset', () => { const hexo = new Hexo(); const PostAsset = hexo.model('PostAsset'); const Post = hexo.model('Post'); let post; before(async () => { await hexo....
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/models/tag.ts
test/scripts/models/tag.ts
import { deepMerge, full_url_for } from 'hexo-util'; import Hexo from '../../../lib/hexo'; import defaults from '../../../lib/hexo/default_config'; describe('Tag', () => { const hexo = new Hexo(); const Tag = hexo.model('Tag'); const Post = hexo.model('Post'); const PostTag = hexo.model('PostTag'); const Rea...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/models/post.ts
test/scripts/models/post.ts
import { join, sep } from 'path'; import BluebirdPromise from 'bluebird'; import { full_url_for } from 'hexo-util'; import Hexo from '../../../lib/hexo'; import chai from 'chai'; const should = chai.should(); describe('Post', () => { const hexo = new Hexo(); const Post = hexo.model('Post'); const Tag = hexo.mode...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/models/cache.ts
test/scripts/models/cache.ts
import Hexo from '../../../lib/hexo'; describe('Cache', () => { const hexo = new Hexo(); const Cache = hexo.model('Cache'); it('_id - required', async () => { try { await Cache.insert({}); } catch (err) { err.message.should.eql('ID is not defined'); } }); });
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/models/moment.ts
test/scripts/models/moment.ts
import moment from 'moment-timezone'; import SchemaTypeMoment from '../../../lib/models/types/moment'; import chai from 'chai'; const should = chai.should(); describe('SchemaTypeMoment', () => { const type = new SchemaTypeMoment('test'); it('cast()', () => { type.cast(1e8).should.eql(moment(1e8)); type.ca...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/models/asset.ts
test/scripts/models/asset.ts
import { join } from 'path'; import Hexo from '../../../lib/hexo'; describe('Asset', () => { const hexo = new Hexo(); const Asset = hexo.model('Asset'); it('default values', async () => { const data = await Asset.insert({ _id: 'foo', path: 'bar' }); data.modified.should.be.true; Ass...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/models/category.ts
test/scripts/models/category.ts
import { deepMerge, full_url_for } from 'hexo-util'; import Hexo from '../../../lib/hexo'; import defaults from '../../../lib/hexo/default_config'; describe('Category', () => { const hexo = new Hexo(); const Category = hexo.model('Category'); const Post = hexo.model('Post'); const ReadOnlyPostCategory = hexo._...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/generators/page.ts
test/scripts/generators/page.ts
import BluebirdPromise from 'bluebird'; import Hexo from '../../../lib/hexo'; import pageGenerator from '../../../lib/plugins/generator/page'; import chai from 'chai'; import { BaseGeneratorReturn } from '../../../lib/types'; const should = chai.should(); type PageGeneratorParams = Parameters<typeof pageGenerator>; typ...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/generators/post.ts
test/scripts/generators/post.ts
import BluebirdPromise from 'bluebird'; import Hexo from '../../../lib/hexo'; import postGenerator from '../../../lib/plugins/generator/post'; import { BaseGeneratorReturn } from '../../../lib/types'; import chai from 'chai'; const should = chai.should(); type PostGeneratorParams = Parameters<typeof postGenerator>; typ...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/generators/asset.ts
test/scripts/generators/asset.ts
import { join } from 'path'; import { mkdirs, rmdir, unlink, writeFile } from 'hexo-fs'; import { readStream } from '../../util'; import Hexo from '../../../lib/hexo'; import assetGenerator from '../../../lib/plugins/generator/asset'; import { spy } from 'sinon'; import chai from 'chai'; const should = chai.should(); t...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/filters/render_post.ts
test/scripts/filters/render_post.ts
import Hexo from '../../../lib/hexo'; import renderPostFilter from '../../../lib/plugins/filter/before_generate/render_post'; import { content, expected } from '../../fixtures/post_render'; type RenderPostFilterParams = Parameters<typeof renderPostFilter>; type RenderPostFilterReturn = ReturnType<typeof renderPostFilte...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/filters/backtick_code_block.ts
test/scripts/filters/backtick_code_block.ts
import { highlight as highlightJs, prismHighlight, escapeHTML } from 'hexo-util'; import defaultConfig from '../../../lib/hexo/default_config'; import Hexo from '../../../lib/hexo'; import defaultCodeBlock from '../../../lib/plugins/filter/before_post_render/backtick_code_block'; import chai from 'chai'; const should =...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/filters/external_link.ts
test/scripts/filters/external_link.ts
import Hexo from '../../../lib/hexo'; import decache from 'decache'; import externalLinkFilter from '../../../lib/plugins/filter/after_render/external_link'; import externalLinkPostFilter from '../../../lib/plugins/filter/after_post_render/external_link'; import chai from 'chai'; const should = chai.should(); type Exte...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/filters/post_permalink.ts
test/scripts/filters/post_permalink.ts
import moment from 'moment'; import Hexo from '../../../lib/hexo'; import postPermalinkFilter from '../../../lib/plugins/filter/post_permalink'; type PostPermalinkFilterParams = Parameters<typeof postPermalinkFilter>; type PostPermalinkFilterReturn = ReturnType<typeof postPermalinkFilter>; describe('post_permalink', (...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/filters/excerpt.ts
test/scripts/filters/excerpt.ts
import Hexo from '../../../lib/hexo'; import excerptFilter from '../../../lib/plugins/filter/after_post_render/excerpt'; type ExcerptFilterParams = Parameters<typeof excerptFilter>; type ExcerptFilterReturn = ReturnType<typeof excerptFilter>; describe('Excerpt', () => { const hexo = new Hexo(); const excerpt: (......
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/filters/meta_generator.ts
test/scripts/filters/meta_generator.ts
import Hexo from '../../../lib/hexo'; import decache from 'decache'; import * as cheerio from 'cheerio'; import type hexoMetaGeneratorInject from '../../../lib/plugins/filter/after_render/meta_generator'; import chai from 'chai'; const should = chai.should(); type hexoMetaGeneratorInjectParams = Parameters<typeof hexoM...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/filters/i18n_locals.ts
test/scripts/filters/i18n_locals.ts
import Hexo from '../../../lib/hexo'; import i18nLocalsFilter from '../../../lib/plugins/filter/template_locals/i18n'; type I18nLocalsFilterParams = Parameters<typeof i18nLocalsFilter>; type I18nLocalsFilterReturn = ReturnType<typeof i18nLocalsFilter>; describe('i18n locals', () => { const hexo = new Hexo(); const...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/filters/titlecase.ts
test/scripts/filters/titlecase.ts
import Hexo from '../../../lib/hexo'; import titlecaseFilter from '../../../lib/plugins/filter/before_post_render/titlecase'; type titlecaseFilterParams = Parameters<typeof titlecaseFilter>; type titlecaseFilterReturn = ReturnType<typeof titlecaseFilter>; describe('Titlecase', () => { const hexo = new Hexo(); cons...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/filters/save_database.ts
test/scripts/filters/save_database.ts
import Hexo from '../../../lib/hexo'; import { exists, unlink } from 'hexo-fs'; import BluebirdPromise from 'bluebird'; import saveDatabaseFilter from '../../../lib/plugins/filter/before_exit/save_database'; type SaveDatabaseFilterParams = Parameters<typeof saveDatabaseFilter> type SaveDatabaseFilterReturn = ReturnType...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/filters/new_post_path.ts
test/scripts/filters/new_post_path.ts
import { join } from 'path'; import moment from 'moment'; import { createSha1Hash } from 'hexo-util'; import { mkdirs, rmdir, unlink, writeFile } from 'hexo-fs'; import Hexo from '../../../lib/hexo'; import newPostPathFilter from '../../../lib/plugins/filter/new_post_path'; type NewPostPathFilterParams = Parameters<typ...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/theme/theme.ts
test/scripts/theme/theme.ts
import { join } from 'path'; import { mkdirs, rmdir, writeFile } from 'hexo-fs'; import Hexo from '../../../lib/hexo'; import chai from 'chai'; const should = chai.should(); describe('Theme', () => { const hexo = new Hexo(join(__dirname, 'theme_test'), {silent: true}); const themeDir = join(hexo.base_dir, 'themes'...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/theme/view.ts
test/scripts/theme/view.ts
import { join } from 'path'; import { mkdirs, rmdir, writeFile } from 'hexo-fs'; import moment from 'moment'; import { fake, assert as sinonAssert } from 'sinon'; import Hexo from '../../../lib/hexo'; import chai from 'chai'; const should = chai.should(); describe('View', () => { const hexo = new Hexo(join(__dirname...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/extend/deployer.ts
test/scripts/extend/deployer.ts
import Deployer from '../../../lib/extend/deployer'; import chai from 'chai'; const should = chai.should(); describe('Deployer', () => { const ctx = {}; it('register()', () => { const d = new Deployer(); // name, fn d.register('test', () => {}); d.get('test').should.exist; // no name // ...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/extend/tag.ts
test/scripts/extend/tag.ts
import { join } from 'path'; import Tag from '../../../lib/extend/tag'; import chai from 'chai'; import Hexo from '../../../lib/hexo'; import defaultConfig from '../../../lib/hexo/default_config'; import posts from '../../../lib/plugins/processor/post'; import Filter from '../../../lib/extend/filter'; import renderPost...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/extend/renderer.ts
test/scripts/extend/renderer.ts
import Renderer from '../../../lib/extend/renderer'; import BluebirdPromise from 'bluebird'; import chai from 'chai'; const should = chai.should(); describe('Renderer', () => { it('register()', () => { const r = new Renderer(); // name, output, fn r.register('yaml', 'json', () => BluebirdPromise.resolv...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/extend/helper.ts
test/scripts/extend/helper.ts
import Helper from '../../../lib/extend/helper'; import chai from 'chai'; const should = chai.should(); describe('Helper', () => { it('register()', () => { const h = new Helper(); // name, fn h.register('test', () => ''); h.get('test').should.exist; // no fn // @ts-expect-error should....
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/extend/tag_errors.ts
test/scripts/extend/tag_errors.ts
import Tag from '../../../lib/extend/tag'; describe('Tag Errors', () => { const assertNunjucksError = (err, line, type) => { err.should.have.property('name', 'Nunjucks Error'); err.should.have.property('message'); err.should.have.property('line', line); err.should.have.property('type', type); }; ...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/extend/processor.ts
test/scripts/extend/processor.ts
import Processor from '../../../lib/extend/processor'; import chai from 'chai'; const should = chai.should(); describe('Processor', () => { it('register()', () => { const p = new Processor(); // pattern, fn p.register('test', () => {}); p.list()[0].should.exist; // fn p.register(() => {});...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/extend/generator.ts
test/scripts/extend/generator.ts
import Generator from '../../../lib/extend/generator'; import chai from 'chai'; const should = chai.should(); describe('Generator', () => { it('register()', () => { const g = new Generator(); // name, fn g.register('test', () => []); g.get('test').should.exist; // fn g.register(() => []); ...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false
hexojs/hexo
https://github.com/hexojs/hexo/blob/1fd997c3ad772ab7ed85b71b886d55248d92bb68/test/scripts/extend/filter.ts
test/scripts/extend/filter.ts
import Filter from '../../../lib/extend/filter'; import { spy } from 'sinon'; import chai from 'chai'; const should = chai.should(); describe('Filter', () => { it('register()', () => { const f = new Filter(); // type, fn f.register('test', () => {}); f.list('test')[0].should.exist; f.list('test...
typescript
MIT
1fd997c3ad772ab7ed85b71b886d55248d92bb68
2026-01-04T15:50:29.521527Z
false