You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- `t.cwd` is reset at the beginning of each test suite, since a test suite usually doesn't want to be affected by other test suites.
104
-
- `t.cwd` will be inherited from the cases in the same test suite, since a leaf case might want to share the context with its parent/sibling cases.
137
+
- The working directory is stored in `t.cwd`.
138
+
- All filesystem operations are performed relative to the working directory, if the given path is not absolute. (e.g., `t.mkdir('foo')`, `t.cd('foo')`, `t.stat('foo')`, etc.)
139
+
- Tests will be run under all mountpoints. The default working directory for a mountpoint is `${mountpoint.path}/{username}/api_test`. (This is subject to change in the future, the reason we include `admin` in the path is to ensure the test user `admin` has write access, see [Permission Documentation](https://github.com/HeyPuter/puter/blob/3290440f4bf7a263f37bc5233565f8fec146f17b/src/backend/doc/A-and-A/permission.md#permission-options) for details.)
140
+
- The working directory is reset at the beginning of each test suite, since a test suite usually doesn't want to be affected by other test suites.
141
+
- The working directory will be inherited from the cases in the same test suite, since a leaf case might want to share the context with its parent/sibling cases.
105
142
106
143
```js
107
144
module.exports = {
@@ -126,5 +163,5 @@ module.exports = {
126
163
127
164
## TODO
128
165
129
-
- [ ] Update usage of apitest.js. (Is it possible to generate the usage automatically?)
130
-
- [ ] Integrate it into CI, optionally running it only in specific scenarios (e.g., when backend code changes).
166
+
- [ ] Reset `t.cwd`if a testcase fails. Currently, `t.cwd` is not reset if a testcase fails.
167
+
- [ ] Integrate apitest into CI, optionally running it only in specific scenarios (e.g., when backend code changes).
0 commit comments