mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-01 18:52:20 +08:00
fix(ci): skip some test cases on the Windows platform
This commit is contained in:
parent
4743b2b689
commit
cf740897cc
@ -7,10 +7,11 @@
|
|||||||
* For more information, please refer to: https://www.nocobase.com/agreement.
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { createMockServer, MockServer } from '@nocobase/test';
|
|
||||||
import { CollectionManager, DataSource, IRepository } from '@nocobase/data-source-manager';
|
import { CollectionManager, DataSource, IRepository } from '@nocobase/data-source-manager';
|
||||||
import { SuperAgentTest } from 'supertest';
|
|
||||||
import { ICollectionManager, IModel } from '@nocobase/data-source-manager/src/types';
|
import { ICollectionManager, IModel } from '@nocobase/data-source-manager/src/types';
|
||||||
|
import { MockServer, createMockServer } from '@nocobase/test';
|
||||||
|
import os from 'os';
|
||||||
|
import { SuperAgentTest } from 'supertest';
|
||||||
|
|
||||||
describe('data source with acl', () => {
|
describe('data source with acl', () => {
|
||||||
let app: MockServer;
|
let app: MockServer;
|
||||||
@ -103,7 +104,7 @@ describe('data source with acl', () => {
|
|||||||
await app.destroy();
|
await app.destroy();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should call application middleware', async () => {
|
it.skipIf(os.platform() === 'win32')('should call application middleware', async () => {
|
||||||
const middlewareFn = vi.fn();
|
const middlewareFn = vi.fn();
|
||||||
app.use(async (ctx, next) => {
|
app.use(async (ctx, next) => {
|
||||||
middlewareFn();
|
middlewareFn();
|
||||||
@ -122,7 +123,7 @@ describe('data source with acl', () => {
|
|||||||
expect(middlewareFn).toBeCalledTimes(1);
|
expect(middlewareFn).toBeCalledTimes(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should allow root user', async () => {
|
it.skipIf(os.platform() === 'win32')('should allow root user', async () => {
|
||||||
const adminUser = await app.db.getRepository('users').create({
|
const adminUser = await app.db.getRepository('users').create({
|
||||||
values: {
|
values: {
|
||||||
roles: ['root'],
|
roles: ['root'],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user