Skip to content

Commit

Permalink
🐛 es default exports
Browse files Browse the repository at this point in the history
  • Loading branch information
JiangWeixian committed Jan 1, 2022
1 parent c3ba24a commit 121780a
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/moody-starfishes-burn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ifu/lunar": patch
---

fix esdefaultmodule
2 changes: 1 addition & 1 deletion packages/lunar/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as solarLunar from 'solarlunar'
import solarLunar from 'solarlunar'
import dayjs from 'dayjs'
import alfy from 'alfy'
import { moonphase } from './moonphase'
Expand Down
11 changes: 11 additions & 0 deletions packages/lunar/lunar.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import test from 'ava'
import alfyTest from 'alfy-test'

test('should has default output', async (t) => {
const alfy = alfyTest()

const result = await alfy(' ')

t.snapshot(result)
})

56 changes: 56 additions & 0 deletions packages/lunar/lunar.test.js.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Snapshot report for `lunar.test.js`

The actual snapshot is saved in `lunar.test.js.snap`.

Generated by [AVA](https://avajs.dev).

## should has default output

> Snapshot 1
[
{
arg: '🐮·牛年',
icon: {
path: ' ',
},
text: {
copy: '牛',
largetype: '牛',
},
title: '🐮·牛年',
},
{
arg: '🌘·残月',
icon: {
path: ' ',
},
text: {
copy: '🌘 残月',
largetype: '🌘 残月',
},
title: '🌘·残月',
},
{
arg: '冬月廿九',
icon: {
path: ' ',
},
text: {
copy: '冬月廿九',
largetype: '冬月廿九',
},
title: '冬月廿九',
},
{
arg: '辛丑年·庚子月·甲寅日',
icon: {
path: ' ',
},
text: {
copy: '辛丑年·庚子月·甲寅日',
largetype: '辛丑年·庚子月·甲寅日',
},
title: '辛丑年·庚子月·甲寅日',
},
]
Binary file added packages/lunar/lunar.test.js.snap
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/lunar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
],
"exports": "./index.js",
"scripts": {
"test": "ava",
"test": "pnpm run build && ava",
"build": "ttsc",
"postinstall": "ifu -c || alfy-init",
"pretest": "npm run build",
Expand Down

0 comments on commit 121780a

Please sign in to comment.