@@ -5,6 +5,7 @@ import { test } from 'uvu';
5
5
import * as assert from 'uvu/assert' ;
6
6
import * as MakeNSIS from '../src/makensis' ;
7
7
import path from 'node:path' ;
8
+ import type Makensis from '../types' ;
8
9
9
10
const scriptFile = {
10
11
minimal : path . join ( process . cwd ( ) , 'tests' , 'fixtures' , 'utf8.nsi' ) ,
@@ -38,7 +39,6 @@ test('Print makensis version as JSON', async () => {
38
39
expected = JSON . stringify ( { version : expected } ) ;
39
40
40
41
let actual = stdout ;
41
- actual . version = `${ actual . version } ` ;
42
42
actual = JSON . stringify ( actual ) ;
43
43
44
44
assert . is ( actual , expected ) ;
@@ -63,7 +63,6 @@ test('Print makensis license as JSON', async () => {
63
63
expected = JSON . stringify ( { license : expected } ) ;
64
64
65
65
let actual = stdout ;
66
- actual . license = `${ actual . license } ` ;
67
66
actual = JSON . stringify ( actual ) ;
68
67
69
68
assert . is ( actual , expected ) ;
@@ -79,7 +78,7 @@ test('Print compiler information', async () => {
79
78
} ) ;
80
79
81
80
test ( 'Print compiler information as JSON' , async ( ) => {
82
- const actual = ( await MakeNSIS . headerInfo ( { json : true } ) ) . stdout . defined_symbols . __GLOBAL__ ;
81
+ const actual = ( await MakeNSIS . headerInfo ( { json : true } ) ) . stdout ? .defined_symbols . __GLOBAL__ ;
83
82
const expected = true ;
84
83
85
84
assert . is ( actual , expected ) ;
@@ -198,7 +197,7 @@ test('Compilation with warning as JSON', async () => {
198
197
test ( 'Compilation with raw arguments and warning' , async ( ) => {
199
198
try {
200
199
const { status } = await MakeNSIS . compile ( scriptFile . warning , {
201
- rawArguments : [ '-WX' ] ,
200
+ rawArguments : '-WX' ,
202
201
} ) ;
203
202
204
203
const expected = 1 ;
@@ -261,7 +260,7 @@ test('Print ${NSISDIR}', async () => {
261
260
262
261
test ( 'Print ${NSISDIR} as JSON' , async ( ) => {
263
262
try {
264
- const nsisDir = await MakeNSIS . nsisDir ( { json : true } ) ;
263
+ const nsisDir = await MakeNSIS . nsisDir ( { json : true } ) as Makensis . CompilerOutput ;
265
264
const nsisCfg = path . join ( nsisDir . nsisdir , 'Include' , 'MUI2.nsh' ) ;
266
265
267
266
const expected = true ;
0 commit comments