How to use the memfs.fs.writeFileSync function in memfs

To help you get started, we’ve selected a few memfs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nrwl / nx / packages / workspace / src / core / project-graph / project-graph.spec.ts View on Github external
it('should handle circular dependencies', () => {
    fs.writeFileSync(
      '/root/libs/shared/util/src/index.ts',
      `import * as ui from '@nrwl/ui';`
    );

    const graph = createProjectGraph();

    expect(graph.dependencies['shared-util']).toEqual([
      {
        type: DependencyType.static,
        source: 'shared-util',
        target: 'ui'
      }
    ]);
    expect(graph.dependencies['ui']).toEqual([
      {
        type: DependencyType.static,
github MarkBind / markbind / __mocks__ / fs-extra-promise.js View on Github external
function copyFileSync(src, dest) {
  if (!fs.lstatSync(src).isFile()) {
    throw new Error(`copyFileSync expected file but got: ${src}`);
  }
  fs.writeFileSync(dest, fs.readFileSync(src));
}
github MarkBind / markbind / __mocks__ / fs-extra-promise.js View on Github external
fs.outputFileSync = (file, data) => {
  createDir(file);
  fs.writeFileSync(file, data);
};