Skip to content

Commit

Permalink
Add a test for #669
Browse files Browse the repository at this point in the history
  • Loading branch information
kishikawakatsumi committed Mar 14, 2023
1 parent 7150592 commit 2b37f11
Show file tree
Hide file tree
Showing 159 changed files with 2,412 additions and 0 deletions.
2,354 changes: 2,354 additions & 0 deletions __tests__/data/TestResults#669.md

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"name":"WormholeTests-5D174A62-B152-4763-A183-5C98F1EC6435","type":2},{"name":"scheduling.log","type":1}]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"name":"testmanagerd.log","type":1}]
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"name":"CountriesAPIUnitTests-47304934-C8A0-461B-AD14-C0C196AE7449","type":2},{"name":"scheduling.log","type":1}]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
29 changes: 29 additions & 0 deletions __tests__/data/TestResults#669.xcresult/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>dateCreated</key>
<date>2023-03-13T11:41:56Z</date>
<key>externalLocations</key>
<array/>
<key>rootId</key>
<dict>
<key>hash</key>
<string>0~-KHLPDPtOvxxAomweXb43nou516OK2jTxLi2OScl5DJ0sF62zmRysAZFcJmLRctM3H0FAJ9TrKcItmv12NDU1g==</string>
</dict>
<key>storage</key>
<dict>
<key>backend</key>
<string>fileBacked2</string>
<key>compression</key>
<string>standard</string>
</dict>
<key>version</key>
<dict>
<key>major</key>
<integer>3</integer>
<key>minor</key>
<integer>39</integer>
</dict>
</dict>
</plist>
25 changes: 25 additions & 0 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,31 @@ test('NoTests.xcresult', async () => {
)
})

test('TestResults#669.xcresult', async () => {
const bundlePath = '__tests__/data/TestResults#669.xcresult'
const formatter = new Formatter(bundlePath)
const report = await formatter.format()

let root = ''
if (process.env.GITHUB_REPOSITORY) {
const pr = github.context.payload.pull_request
const sha = (pr && pr.head.sha) || github.context.sha
root = `${github.context.serverUrl}/${github.context.repo.owner}/${github.context.repo.repo}/blob/${sha}/`
}
const re = new RegExp(`${root}`, 'g')
const reportText = `${report.reportSummary}\n${report.reportDetail}`.replace(
re,
''
)

const outputPath = path.join(os.tmpdir(), 'NoTests.md')
await writeFile(outputPath, reportText)
// await writeFile('TestResults#669.md', reportText)
expect((await readFile(outputPath)).toString()).toBe(
(await readFile('__tests__/data/TestResults#669.md')).toString()
)
})

test('test runs', () => {
process.env['INPUT_PATH'] = '__tests__/data/Example.xcresult'
process.env['INPUT_SHOW-PASSED-TESTS'] = 'true'
Expand Down

0 comments on commit 2b37f11

Please sign in to comment.