MCPcopy Index your code
hub / github.com/parse-community/parse-server / getTests

Method getTests

ci/CiVersionCheck.js:98–114  ·  view source on GitHub ↗

* Returns the test environments as specified in the YAML file.

()

Source from the content-addressed store, hash-verified

96 * Returns the test environments as specified in the YAML file.
97 */
98 async getTests() {
99 try {
100 // Get CI workflow
101 const ciYaml = await fs.readFile(this.yamlFilePath, 'utf-8');
102 const ci = yaml.parse(ciYaml);
103
104 // Extract package versions
105 let versions = this.ciEnvironmentsKeyPath.split('.').reduce((o,k) => o !== undefined ? o[k] : undefined, ci);
106 versions = Object.entries(versions)
107 .map(entry => entry[1])
108 .filter(entry => entry[this.ciVersionKey]);
109
110 return versions;
111 } catch (e) {
112 throw `Failed to determine ${this.packageName} versions from CI YAML file with error: ${e}`;
113 }
114 }
115
116 /**
117 * Returns the package versions which are missing in the CI environment.

Callers 1

checkMethod · 0.95

Calls 2

readFileMethod · 0.80
filterMethod · 0.80

Tested by

no test coverage detected