web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
911 B

  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. const assert = require("assert");
  4. const fs_macchiato_1 = require("../../../fs.macchiato");
  5. const adapter = require("./fs");
  6. describe('Adapters → FileSystem', () => {
  7. it('should return original FS methods', () => {
  8. const expected = adapter.FILE_SYSTEM_ADAPTER;
  9. const actual = adapter.createFileSystemAdapter();
  10. assert.deepStrictEqual(actual, expected);
  11. });
  12. it('should return custom FS methods', () => {
  13. const customLstatSyncMethod = () => new fs_macchiato_1.Stats();
  14. const expected = Object.assign(Object.assign({}, adapter.FILE_SYSTEM_ADAPTER), { lstatSync: customLstatSyncMethod });
  15. const actual = adapter.createFileSystemAdapter({
  16. lstatSync: customLstatSyncMethod
  17. });
  18. assert.deepStrictEqual(actual, expected);
  19. });
  20. });