@@ -62,7 +62,7 @@ describe("blockREADME", () => {
62
62
"README.md": "<h1 align="center">Test Title</h1>
63
63
64
64
<p align="center">
65
- First sentence.
65
+ First sentence.
66
66
Second sentence.
67
67
</p>
68
68
@@ -89,6 +89,47 @@ describe("blockREADME", () => {
89
89
` ) ;
90
90
} ) ;
91
91
92
+ test ( "options.explainer" , ( ) => {
93
+ const creation = testBlock ( blockREADME , {
94
+ options : {
95
+ ...options ,
96
+ explainer : [ "And a one." , "And a two." ] ,
97
+ } ,
98
+ } ) ;
99
+
100
+ expect ( creation ) . toMatchInlineSnapshot ( `
101
+ {
102
+ "files": {
103
+ "README.md": "<h1 align="center">Test Title</h1>
104
+
105
+ <p align="center">Test description</p>
106
+
107
+ <p align="center">
108
+ <a href="https://github.com/test-owner/test-repository/blob/main/.github/CODE_OF_CONDUCT.md" target="_blank"><img alt="🤝 Code of Conduct: Kept" src="https://img.shields.io/badge/%F0%9F%A4%9D_code_of_conduct-kept-21bb42" /></a>
109
+ <a href="https://codecov.io/gh/test-owner/test-repository" target="_blank"><img alt="🧪 Coverage" src="https://img.shields.io/codecov/c/github/test-owner/test-repository?label=%F0%9F%A7%AA%20coverage" /></a>
110
+ <a href="https://github.com/test-owner/test-repository/blob/main/LICENSE.md" target="_blank"><img alt="📝 License: MIT" src="https://img.shields.io/badge/%F0%9F%93%9D_license-MIT-21bb42.svg"></a>
111
+ <a href="http://npmjs.com/package/test-repository"><img alt="📦 npm version" src="https://img.shields.io/npm/v/test-repository?color=21bb42&label=%F0%9F%93%A6%20npm" /></a>
112
+ <img alt="💪 TypeScript: Strict" src="https://img.shields.io/badge/%F0%9F%92%AA_typescript-strict-21bb42.svg" />
113
+ </p>
114
+
115
+ And a one.
116
+ And a two.
117
+
118
+ ## Usage
119
+
120
+ Use it.
121
+
122
+ ## Development
123
+
124
+ See [\`.github/CONTRIBUTING.md\`](./.github/CONTRIBUTING.md), then [\`.github/DEVELOPMENT.md\`](./.github/DEVELOPMENT.md).
125
+ Thanks! 💖
126
+
127
+ ",
128
+ },
129
+ }
130
+ ` ) ;
131
+ } ) ;
132
+
92
133
test ( "options.logo without sizing" , ( ) => {
93
134
const creation = testBlock ( blockREADME , {
94
135
options : {
@@ -177,6 +218,55 @@ describe("blockREADME", () => {
177
218
` ) ;
178
219
} ) ;
179
220
221
+ test ( "options.explainer and options.logo" , ( ) => {
222
+ const creation = testBlock ( blockREADME , {
223
+ options : {
224
+ ...options ,
225
+ explainer : [ "And a one." , "And a two." ] ,
226
+ logo : {
227
+ alt : "My logo" ,
228
+ height : 100 ,
229
+ src : "img.jpg" ,
230
+ width : 128 ,
231
+ } ,
232
+ } ,
233
+ } ) ;
234
+
235
+ expect ( creation ) . toMatchInlineSnapshot ( `
236
+ {
237
+ "files": {
238
+ "README.md": "<h1 align="center">Test Title</h1>
239
+
240
+ <p align="center">Test description</p>
241
+
242
+ <p align="center">
243
+ <a href="https://github.com/test-owner/test-repository/blob/main/.github/CODE_OF_CONDUCT.md" target="_blank"><img alt="🤝 Code of Conduct: Kept" src="https://img.shields.io/badge/%F0%9F%A4%9D_code_of_conduct-kept-21bb42" /></a>
244
+ <a href="https://codecov.io/gh/test-owner/test-repository" target="_blank"><img alt="🧪 Coverage" src="https://img.shields.io/codecov/c/github/test-owner/test-repository?label=%F0%9F%A7%AA%20coverage" /></a>
245
+ <a href="https://github.com/test-owner/test-repository/blob/main/LICENSE.md" target="_blank"><img alt="📝 License: MIT" src="https://img.shields.io/badge/%F0%9F%93%9D_license-MIT-21bb42.svg"></a>
246
+ <a href="http://npmjs.com/package/test-repository"><img alt="📦 npm version" src="https://img.shields.io/npm/v/test-repository?color=21bb42&label=%F0%9F%93%A6%20npm" /></a>
247
+ <img alt="💪 TypeScript: Strict" src="https://img.shields.io/badge/%F0%9F%92%AA_typescript-strict-21bb42.svg" />
248
+ </p>
249
+
250
+ <img align="right" alt="My logo" height="100" src="img.jpg" width="128">
251
+
252
+ And a one.
253
+ And a two.
254
+
255
+ ## Usage
256
+
257
+ Use it.
258
+
259
+ ## Development
260
+
261
+ See [\`.github/CONTRIBUTING.md\`](./.github/CONTRIBUTING.md), then [\`.github/DEVELOPMENT.md\`](./.github/DEVELOPMENT.md).
262
+ Thanks! 💖
263
+
264
+ ",
265
+ },
266
+ }
267
+ ` ) ;
268
+ } ) ;
269
+
180
270
test ( "without addons" , ( ) => {
181
271
const creation = testBlock ( blockREADME , {
182
272
options,
0 commit comments