refactor: avoid promise overhead (#8028)

This commit is contained in:
Sukka
2021-08-17 02:45:53 +08:00
committed by GitHub
parent 8053b33b03
commit 6e3b58ed1d
543 changed files with 5295 additions and 5694 deletions

View File

@@ -2,12 +2,12 @@ const configUtils = require('../../lib/utils/common-config');
const nock = require('nock');
describe('index', () => {
it('transElemText', async () => {
it('transElemText', () => {
const $ = () => 'RSSHub';
expect(configUtils.transElemText($, '$()')).toBe('RSSHub');
});
it('replaceParams', async () => {
it('replaceParams', () => {
const $ = () => 'RSSHub';
const data = {
params: {
@@ -18,7 +18,7 @@ describe('index', () => {
expect(configUtils.replaceParams(data, data.title, $)).toBe('RSSHub');
});
it('getProp', async () => {
it('getProp', () => {
const $ = () => 'RSSHub';
const data = {
title: 'RSSHub',
@@ -27,7 +27,7 @@ describe('index', () => {
expect(configUtils.getProp(data, 'title', $)).toBe('RSSHub');
});
it('all', async () => {
it('all', () => {
const $ = () => 'RSSHub';
const data = {
params: {