File tree 3 files changed +41
-1
lines changed
3 files changed +41
-1
lines changed Original file line number Diff line number Diff line change 43
43
cache : pnpm
44
44
- run : pnpm install
45
45
- run : pnpm build
46
+ - run : git fetch --all && git fetch --unshallow # this is to work for the acceptance tests
46
47
- run : pnpm test
47
48
env :
48
49
GITHUB_API_URL : " "
50
+ GITHUB_AUTH : ${{ secrets.GITHUB_TOKEN }} # this is for acceptance tests
Original file line number Diff line number Diff line change
1
+ import { describe , it , vi } from "vitest" ;
2
+ import execa from "execa" ;
3
+ import { expect } from "vitest" ;
4
+
5
+ if ( ! process . env . GITHUB_AUTH ) {
6
+ console . warn ( "Warning: to run all tests you need to provide a GITHUB_AUTH" ) ;
7
+ }
8
+
9
+ describe ( "command line interface" , ( ) => {
10
+ it . skipIf ( ! process . env . GITHUB_AUTH ) ( "can produce a result" , async ( ) => {
11
+ const { stdout } = await execa . node ( "./bin/cli.js" , [
12
+ "--from=ee1c697fcf871114c53e9847c43e221d3056f19d" ,
13
+ "--to=b20002d9760e9e212bc623c8f3f42931ddc01bda" ,
14
+ ] ) ;
15
+
16
+ expect ( stdout ) . toMatchInlineSnapshot ( `
17
+ "
18
+ ## Unreleased (2025-03-05)
19
+
20
+ #### :rocket: Enhancement
21
+ * \`github-changelog\`
22
+ * [#33](https://github.com/embroider-build/github-changelog/pull/33) support github enterpise url detection and env vars ([@patricklx](https://github.com/patricklx))
23
+
24
+ #### Committers: 1
25
+ - Patrick Pircher ([@patricklx](https://github.com/patricklx))
26
+
27
+
28
+ ## v1.1.0-github-changelog (2025-01-25)
29
+
30
+ #### :house: Internal
31
+ * \`github-changelog\`
32
+ * [#29](https://github.com/embroider-build/github-changelog/pull/29) Prepare Release ([@github-actions[bot]](https://github.com/apps/github-actions))
33
+
34
+ #### Committers: 1
35
+ - [@github-actions[bot]](https://github.com/apps/github-actions)"
36
+ ` ) ;
37
+ } ) ;
38
+ } ) ;
Original file line number Diff line number Diff line change @@ -2,6 +2,6 @@ import { defineConfig } from 'vitest/config'
2
2
3
3
export default defineConfig ( {
4
4
test : {
5
- include : [ '**/src/**/*.{test,spec}.[tj]s' ]
5
+ include : [ '**/src/**/*.{test,spec}.[tj]s' , 'tests/**/*.js' ]
6
6
} ,
7
7
} )
You can’t perform that action at this time.
0 commit comments