This commit is contained in:
10 files changed
+24
-24
No files matched your search
+2
-2
@@ -6,8 +6,8 @@ import { normalize } from '../dist/core/state.js';
|
||||
import { Session } from '../dist/core/session.js';
|
||||
|
||||
// godbolt's stored answers, in pplus-core
|
||||
const goldens = fs.readdirSync(new URL('../core/mojo/golden/', import.meta.url)).filter((f) => /^[0-9a-f]{64}\.json$/.test(f))
|
||||
.map((f) => JSON.parse(fs.readFileSync(new URL(`../core/mojo/golden/${f}`, import.meta.url), 'utf8')));
|
||||
const goldens = fs.readdirSync(new URL('../core/library/mojo/golden/', import.meta.url)).filter((f) => /^[0-9a-f]{64}\.json$/.test(f))
|
||||
.map((f) => JSON.parse(fs.readFileSync(new URL(`../core/library/mojo/golden/${f}`, import.meta.url), 'utf8')));
|
||||
|
||||
test('the session keeps each answer with the source it answered, and says when it is stale', async () => {
|
||||
const s = new Session(normalize({ v: 3, lang: 'mojo', sources: { mojo: 'fn main():\n print(1)\n' } }));
|
||||
|
||||
Reference in new issue
Block a user