Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjoezhang committed Apr 7, 2024
1 parent 5703a76 commit 3458977
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/scripts/models/post_asset.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { join } from 'path';
import { join, posix } from 'path';
import Hexo from '../../../lib/hexo';
import defaults from '../../../lib/hexo/default_config';

Expand Down Expand Up @@ -54,7 +54,7 @@ describe('PostAsset', () => {
slug: 'foo.jpg',
post: post._id
});
data.path.should.eql(join(post.path, data.slug));
data.path.should.eql(posix.join(post.path, data.slug));

PostAsset.removeById(data._id);
});
Expand All @@ -66,7 +66,7 @@ describe('PostAsset', () => {
slug: 'foo.htm',
post: post._id
});
data.path.should.eql(join(post.path, data.slug));
data.path.should.eql(posix.join(post.path, data.slug));

PostAsset.removeById(data._id);
});
Expand All @@ -78,7 +78,7 @@ describe('PostAsset', () => {
slug: 'foo.htm',
post: post._id
});
data.path.should.eql(join(post.path, data.slug));
data.path.should.eql(posix.join(post.path, data.slug));

PostAsset.removeById(data._id);
});
Expand All @@ -90,7 +90,7 @@ describe('PostAsset', () => {
slug: 'foo.html',
post: post._id
});
data.path.should.eql(join(post.path + '.htm-foo/', data.slug));
data.path.should.eql(posix.join(post.path + '.htm-foo/', data.slug));

PostAsset.removeById(data._id);
});
Expand Down

0 comments on commit 3458977

Please sign in to comment.