Skip to content

Commit e9821d8

Browse files
committed
fix: add meta to tests
1 parent d87931e commit e9821d8

File tree

2 files changed

+43
-16
lines changed

2 files changed

+43
-16
lines changed

subworkflows/local/normalize/tests/main.nf.test

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,22 @@ nextflow_workflow {
88
when {
99
workflow {
1010
"""
11-
input[0] = Channel.of(
11+
// Input 0: counts channel with meta and RCC files
12+
input[0] = Channel.of([
13+
[ id: 'test_sample' ], // meta map
1214
[
13-
file(params.pipelines_testdata_base_path + 'nanostring/RCC_files/salmon_01_01.RCC', checkIfExists: true),
14-
file(params.pipelines_testdata_base_path + 'nanostring/RCC_files/salmon_02_02.RCC', checkIfExists: true),
15-
file(params.pipelines_testdata_base_path + 'nanostring/RCC_files/salmon_03_03.RCC', checkIfExists: true),
16-
file(params.pipelines_testdata_base_path + 'nanostring/RCC_files/salmon_04_04.RCC', checkIfExists: true)
15+
file('https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/nanostring/RCC_files/salmon_01_01.RCC', checkIfExists: true),
16+
file('https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/nanostring/RCC_files/salmon_02_02.RCC', checkIfExists: true),
17+
file('https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/nanostring/RCC_files/salmon_03_03.RCC', checkIfExists: true),
18+
file('https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/nanostring/RCC_files/salmon_04_04.RCC', checkIfExists: true)
1719
]
18-
)
19-
input[1] = file(params.pipelines_testdata_base_path + 'nanostring/samplesheets/samplesheet_test.csv', checkIfExists: true)
20+
])
21+
22+
// Input 1: samplesheet channel with meta and file
23+
input[1] = Channel.of([
24+
[ id: 'test_samplesheet' ], // meta map
25+
file('https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/nanostring/samplesheets/samplesheet_test.csv', checkIfExists: true)
26+
])
2027
"""
2128
}
2229
}

subworkflows/local/normalize/tests/main.nf.test.snap

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,49 @@
33
"content": [
44
{
55
"0": [
6-
"normalized_counts.tsv:md5,a0124c7a24bd04296f441d9ade82a05f"
6+
[
7+
{
8+
"id": "test_sample"
9+
},
10+
"normalized_counts.tsv:md5,a0124c7a24bd04296f441d9ade82a05f"
11+
]
712
],
813
"1": [
9-
"normalized_counts_wo_HKnorm.tsv:md5,5a2ce112c24e1b0d0f4cf3392111ef9e"
14+
[
15+
{
16+
"id": "test_sample"
17+
},
18+
"normalized_counts_wo_HKnorm.tsv:md5,5a2ce112c24e1b0d0f4cf3392111ef9e"
19+
]
1020
],
1121
"2": [
12-
"versions.yml:md5,eacb31511724a946730536d6bb82ae6d"
22+
"versions.yml:md5,8d505473166a2c4bac1c65a5475ae481"
1323
],
1424
"normalized_counts": [
15-
"normalized_counts.tsv:md5,a0124c7a24bd04296f441d9ade82a05f"
25+
[
26+
{
27+
"id": "test_sample"
28+
},
29+
"normalized_counts.tsv:md5,a0124c7a24bd04296f441d9ade82a05f"
30+
]
1631
],
1732
"normalized_counts_wo_HK": [
18-
"normalized_counts_wo_HKnorm.tsv:md5,5a2ce112c24e1b0d0f4cf3392111ef9e"
33+
[
34+
{
35+
"id": "test_sample"
36+
},
37+
"normalized_counts_wo_HKnorm.tsv:md5,5a2ce112c24e1b0d0f4cf3392111ef9e"
38+
]
1939
],
2040
"versions": [
21-
"versions.yml:md5,eacb31511724a946730536d6bb82ae6d"
41+
"versions.yml:md5,8d505473166a2c4bac1c65a5475ae481"
2242
]
2343
}
2444
],
2545
"meta": {
26-
"nf-test": "0.9.0",
27-
"nextflow": "24.10.1"
46+
"nf-test": "0.9.2",
47+
"nextflow": "25.04.6"
2848
},
29-
"timestamp": "2024-11-19T12:03:04.242579414"
49+
"timestamp": "2025-08-27T16:47:34.392689745"
3050
}
3151
}

0 commit comments

Comments
 (0)