Skip to main content

测试

SheetJS 库具有广泛的测试套件。

¥SheetJS libraries have extensive test suites.

本地测试

¥Local Tests

make test 将运行 NodeJS 测试。默认情况下,它对每种受支持格式的文件运行测试。要测试特定文件类型,请将 FMTS 设置为所需的文件扩展名。make test_misc 提供特定于功能的测试。

¥make test will run the NodeJS tests. By default it runs tests on files in every supported format. To test a specific file type, set FMTS to the desired file extension. Feature-specific tests are available with make test_misc.

$ make test_misc   # run core tests
$ make test # run full tests

要启用所有错误,请设置环境变量 WTF=1

¥To enable all errors, set the environment variable WTF=1:

$ make test        # run full tests
$ WTF=1 make test # enable all error messages

floweslint 检查可用:

¥flow and eslint checks are available:

$ make lint        # eslint checks
$ make tslint # check TS definitions

测试环境

¥Tested Environments

(click to show)

Browsers

  • IE 6/7/8/9/10/11 (IE 6-9 require shims)
  • Chrome 26+ (including Android 6.0+)
  • Safari 8+ (Desktop) and Safari 10+ (iOS)
  • Edge 13-18 and 79+
  • FF Latest

The automated browser tests seek to test the latest patch version of each major release of Chromium ending in 0 (starting from Chrome 30).

Edge originally was an independent browser, becoming a Chromium fork in version 79. Since the new releases should be nearly identical to the Chrome counterpart, the Edge tests are run on major releases ending in 5 (starting from Edge 85).

Server Platforms

  • NodeJS 0.8, 0.10, 0.12, and every major version starting from 4
  • io.js 1/2/3
  • Bun latest
  • Deno latest

The test suite also includes tests for various time zones. Timezones can be controlled by setting the TZ environment variable:

env TZ="Asia/Kolkata" WTF=1 make test_misc

测试文件

¥Test Files

下载测试工件

¥Download the test artifacts.

工件来源

¥Artifact Sources

测试文件包括来自外部源的文件的衍生文件。文件在各种电子表格软件中打开并导出为 CSV 和其他文件格式。随附的 README.md 文件解释了命名约定和文件来源。

¥Test files include derivatives of files from external sources. Files were opened in various spreadsheet software and exported to CSV and other file formats. The enclosed README.md file explains the naming conventions and file origins.

外部来源通常根据开源许可分发文件。一些来源有专用于公共字段的文件。

¥External sources typically distribute files under open source licenses. Some sources have dedicated files to the public domain.

假设外部来源具有根据声明的许可条款发布文件的适当授权。例如,如果外部源根据 Apache 2.0 许可证发布文件,则假定他们直接生成文件或获得创建者的许可。

¥It is assumed that external sources have proper authorization to release files under the asserted license terms. For example, if an external source releases a file under the Apache 2.0 license, it is assumed that they either generated the file directly or obtained permission from the creator.

删除请求

¥Requests for Removal

外部来源可能在未经适当同意的情况下添加了来自贡献者的文件。如果文件包含未经发布原始内容的各方适当审查的私有信息,我们鼓励用户提交报告。

¥External sources may have added files from contributors without proper consent. Users are encouraged to submit reports if files contain private information that was not properly vetted by the parties that posted the original content.

请输入 发送电子邮件在主源存储库中提交问题

¥Please send an email or file an issue in the main source repository.