This test tries to demonstrate the most intuitive or idiomatic means of importing a file as a custom type, which differs between each tool. For the purposes of the test, "custom type" is assumed to be some representation of a file for which there is no existing plugin or configuration available. Handling the import generally requires writing a plugin or configuration, so the result of this test takes into account how difficult it would be for a developer to write such a plugin.
import customType from 'custom-type:./binary.bin'; console.log(customType); // an instance of CustomType
The implementation details of how
customType is produced differs between each test, but the result should be the same. The imported
customType value must be an instance of
CustomType class, which has a
buffer property containing the binary data of