Download tasks/format-code-task-000027/tests/test.patch from FineEnvs/MiMo-V2.6-RL-harbor-code: direct link, hf CLI and curl.
- Browser
- Download file 2.04 kB
-
https://huggingface.co/datasets/FineEnvs/MiMo-V2.6-RL-harbor-code/resolve/main/tasks/format-code-task-000027/tests/test.patch
- Command line
-
hf download hf://datasets/FineEnvs/MiMo-V2.6-RL-harbor-code/tasks/format-code-task-000027/tests/test.patch
-
curl -L -o test.patch https://huggingface.co/datasets/FineEnvs/MiMo-V2.6-RL-harbor-code/resolve/main/tasks/format-code-task-000027/tests/test.patch
2.04 kB
| diff --git a/test/types/schema.test.ts b/test/types/schema.test.ts | |
| index fc0204e2a..fc7ae0fa0 100644 | |
| --- a/test/types/schema.test.ts | |
| +++ b/test/types/schema.test.ts | |
| async function gh13797() { | |
| expectType<IUser>(this); return ''; | |
| } } }); | |
| } | |
| + | |
| +function gh13900StringMapOfNumber() { | |
| + const schema = new Schema({ | |
| + myMap: { type: 'Map', of: Number, required: true } | |
| + }); | |
| + const Test = model('Test_gh13900_num', schema); | |
| + | |
| + const doc = new Test({ myMap: { answer: 42 } }); | |
| + expectType<Map<string, number>>(doc.myMap); | |
| + expectType<number | undefined>(doc.myMap!.get('answer')); | |
| +} | |
| + | |
| +function gh13900StringMapOfString() { | |
| + const schema = new Schema({ | |
| + myMap: { type: 'Map', of: String, required: true } | |
| + }); | |
| + const Test = model('Test_gh13900_str', schema); | |
| + | |
| + const doc = new Test({ myMap: { answer: 'hi' } }); | |
| + expectType<Map<string, string>>(doc.myMap); | |
| + expectType<string | undefined>(doc.myMap!.get('answer')); | |
| +} | |
| + | |
| +function gh13900StringMapOfMixed() { | |
| + | |
| + const schema = new Schema({ | |
| + instance: { | |
| + type: 'Map', | |
| + of: Schema.Types.Mixed, | |
| + required: true | |
| + } | |
| + }); | |
| + const Test = model('Test_gh13900_mixed', schema); | |
| + | |
| + const doc = new Test({ instance: { foo: 1 } }); | |
| + expectType<Map<string, any>>(doc.instance); | |
| +} | |
| + | |
| +function gh13900StringMapPreservesConstructorBehavior() { | |
| + | |
| + const schema = new Schema({ | |
| + myMap: { type: Map, of: Number, required: true } | |
| + }); | |
| + const Test = model('Test_gh13900_ctor', schema); | |
| + | |
| + const doc = new Test({ myMap: { x: 1 } }); | |
| + expectType<Map<string, number>>(doc.myMap); | |
| +} | |
| diff --git a/test_commands.json b/test_commands.json | |
| new file mode 100644 | |
| index 000000000..0f7dbefd0 | |
| --- /dev/null | |
| +++ b/test_commands.json | |
| +{ | |
| + "test_commands": ["npx tsd"] | |
| +} | |
| diff --git a/mimo_test_command.sh b/mimo_test_command.sh | |
| new file mode 100755 | |
| --- /dev/null | |
| +++ b/mimo_test_command.sh | |
| +#!/usr/bin/env bash | |
| + | |
| +set -uo pipefail | |
| +cd /testbed | |
| +rc=0 | |
| +npx tsd | |
| +rc=$(( rc | $? )) | |
| +exit $rc | |