Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
SoonIter committed Aug 9, 2024
1 parent c9f7f9b commit 95c8237
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/core/tests/lcp.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import path from 'node:path';
import os from 'node:os';
import { vol } from 'memfs';
import { beforeEach, describe, expect, it, vi } from 'vitest';
import { calcLongestCommonPath } from '../src/utils/helper';
Expand All @@ -20,7 +20,7 @@ describe('LCP calculate correctly', () => {
it('correct 1', async () => {
vol.fromJSON({ '/Users/Someone/project-a/src': null });

if (path.sep === '/') {
if (os.platform() !== 'win32') {
const result = await calcLongestCommonPath([
'/Users/Someone/project-a/src/helpers',
'/Users/Someone/project-a/src',
Expand All @@ -40,7 +40,7 @@ describe('LCP calculate correctly', () => {
it('correct 2', async () => {
vol.fromJSON({ '/Users/Someone/project-monorepo': null });

if (path.sep === '/') {
if (os.platform() !== 'win32') {
const result = await calcLongestCommonPath([
'/Users/Someone/project-monorepo/packages-a/src/index.ts',
'/Users/Someone/project-monorepo/packages-util/src/index.js',
Expand All @@ -61,7 +61,7 @@ describe('LCP calculate correctly', () => {
vol.fromJSON({
'/Users/Someone/project/src/index.js': '',
});
if (path.sep === '/') {
if (os.platform() !== 'win32') {
const result = await calcLongestCommonPath([
'/Users/Someone/project/src/index.js',
]);
Expand Down

0 comments on commit 95c8237

Please sign in to comment.