Presets

Summary

Higher level presets, derived from Note Presets

There are several different types of presets:

  • note presets: these are presets that create a single note
  • notes presets: these are presets that initialize notes across multiple vaults
  • vault presets: these are presets that configure notes

Quickstart

The preset functions creates a sample workspace with a set of notes. For example, using setupBasic will create a workspace with the following notes

- foo
- foo.ch1
- bar

You can reference these notes by their title using engine.notes

const fooNote = engine.notes["foo"];

It can be hard to navigate to the correct file using vscode. The preset functions are located in ../packages/engine-test-utils/src/presets/engine-server/utils.ts (Private) and the low level presets are in ../packages/common-test-utils/src/presets/notes.ts (Private)

Note Preset

#todo (Private)

Notes Preset

setupBasic

setupRefs

Vault Preset

  MULTI_VAULT_WITH_THREE_VAULTS: () => {
    return [
      { fsPath: "vault1" },
      { fsPath: "vault2" },
      { fsPath: "vault3", name: "vaultThree" },
    ] as DVault[];
  },

Backlinks