Skip to content

Commit c44939c

Browse files
deleonioCopilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Martin <6279703+deleonio@users.noreply.github.com>
1 parent e8257c8 commit c44939c

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

packages/tools/kolibri-cli/test/cli-interface.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('CLI interface', () => {
1515
const cwd = process.cwd();
1616
process.chdir(tmpDir);
1717

18-
const typedBem = require('typed-bem/scss');
18+
import * as typedBem from 'typed-bem/scss';
1919
const original = typedBem.generateBemScssFile;
2020
const calls: string[] = [];
2121
typedBem.generateBemScssFile = (_: unknown, name: string) => { calls.push(name); };

packages/tools/kolibri-cli/test/exec-task.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { ExecTask } from '../src/migrate/runner/tasks/common/ExecTask';
33

44
describe('ExecTask', () => {
55
it('executes given command', () => {
6-
const cp = require('child_process');
6+
import * as cp from 'child_process';
77
const original = cp.execSync;
88
let called = '';
99
cp.execSync = (cmd: string) => {

packages/tools/kolibri-cli/test/handle-dependency.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { HandleDependencyTask } from '../src/migrate/runner/tasks/common/HandleD
44

55
describe('HandleDependencyTask', () => {
66
it('calls package manager with dependencies', async () => {
7-
const childProc = require('child_process');
7+
import * as childProc from 'child_process';
88
const original = childProc.execSync;
99
let commands: string[] = [];
1010
childProc.execSync = (cmd: string) => { commands.push(cmd); return Buffer.from(''); };

packages/tools/kolibri-cli/test/json-task.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ describe('JsonTask', () => {
1616

1717
process.chdir(cwd);
1818
const pkg = JSON.parse(fs.readFileSync(path.join(tmpDir, 'package.json'), 'utf8'));
19-
assert.equal(pkg.test, 'mocha');
19+
assert.equal(pkg.scripts.test, 'mocha');
2020
});
2121
});

packages/tools/kolibri-cli/test/rename-slot.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ describe('RenameSlotNameTask', () => {
1818
const tsxContent = fs.readFileSync(tsxPath, 'utf8');
1919
const htmlContent = fs.readFileSync(htmlPath, 'utf8');
2020
assert.ok(tsxContent.includes('slot="header-right"'));
21-
assert.ok(htmlContent.includes('slot="header"'));
21+
assert.ok(htmlContent.includes('slot="header-right"'));
2222
});
2323
});

packages/tools/kolibri-cli/test/tsconfig-reconfigure.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ describe('TsConfigReconfigureTask', () => {
1616

1717
process.chdir(cwd);
1818
const config = JSON.parse(fs.readFileSync(path.join(tmpDir, 'tsconfig.json'), 'utf8'));
19-
assert.equal(config.target, 'ESNext');
19+
assert.equal(config.compilerOptions.target, 'ESNext');
2020
});
2121
});

0 commit comments

Comments
 (0)