Skip to content

Commit

Permalink
feat(test): test config
Browse files Browse the repository at this point in the history
  • Loading branch information
LetTTGACO committed May 19, 2024
1 parent 966eb16 commit f74732d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 35 deletions.
34 changes: 14 additions & 20 deletions tests/test-elog/elog.config-muti.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
import { defineConfig } from '@elogx-test/elog';
import fromYuque from '@elogx-test/plugin-from-yuque';
import fromYuque from '@elogx-test/plugin-from-yuque-pwd';
import fromYuqueToken from '@elogx-test/plugin-from-yuque-token';
import toLocal from '@elogx-test/plugin-to-local';
import imageLocal from '@elogx-test/plugin-image-local';

export default defineConfig([
{
from: fromYuque({
pwd: {
username: process.env.YUQUE_USERNAME,
password: process.env.YUQUE_PWD,
login: process.env.YUQUE_LOGIN,
repo: process.env.YUQUE_REPO,
onlyPublic: false,
linebreak: false,
cacheFilePath: 'elog.cache1.json',
},
from: fromYuqueToken({
token: process.env.YUQUE_TOKEN,
login: process.env.YUQUE_LOGIN,
repo: process.env.YUQUE_REPO,
onlyPublic: false,
}),
to: [
toLocal({
Expand All @@ -34,15 +30,13 @@ export default defineConfig([
},
{
from: fromYuque({
pwd: {
username: process.env.YUQUE_USERNAME,
password: process.env.YUQUE_PWD,
login: process.env.YUQUE_LOGIN,
repo: process.env.YUQUE_REPO,
onlyPublic: false,
linebreak: false,
cacheFilePath: 'elog.cache2.json',
},
username: process.env.YUQUE_USERNAME,
password: process.env.YUQUE_PWD,
login: process.env.YUQUE_LOGIN,
repo: process.env.YUQUE_REPO,
onlyPublic: false,
linebreak: false,
cacheFilePath: 'elog.cache2.json',
}),
to: [
toLocal({
Expand Down
20 changes: 5 additions & 15 deletions tests/test-elog/elog.config.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
import { defineConfig } from '@elogx-test/elog';
import fromYuque from '@elogx-test/plugin-from-yuque';
import fromYuque from '@elogx-test/plugin-from-yuque-token';
import toLocal from '@elogx-test/plugin-to-local';
import imageLocal from '@elogx-test/plugin-image-local';

export default defineConfig({
from: fromYuque({
pwd: {
username: process.env.YUQUE_USERNAME,
password: process.env.YUQUE_PWD,
login: process.env.YUQUE_LOGIN,
repo: process.env.YUQUE_REPO,
onlyPublic: false,
linebreak: false,
},
token: {
token: process.env.YUQUE_TOKEN,
login: process.env.YUQUE_LOGIN,
repo: process.env.YUQUE_REPO,
onlyPublic: false,
},
token: process.env.YUQUE_TOKEN,
login: process.env.YUQUE_LOGIN,
repo: process.env.YUQUE_REPO,
onlyPublic: false,
}),
to: [
toLocal({
Expand Down
1 change: 1 addition & 0 deletions tests/test-elog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"dependencies": {
"@elogx-test/elog": "workspace:*",
"@elogx-test/plugin-from-yuque-pwd": "workspace:*",
"@elogx-test/plugin-from-yuque-token": "workspace:*",
"@elogx-test/plugin-image-local": "workspace:*",
"@elogx-test/plugin-to-local": "workspace:*",
"@types/node": "~18.15.3"
Expand Down

0 comments on commit f74732d

Please sign in to comment.