(str: string)
| 172 | |
| 173 | /* @__NO_SIDE_EFFECTS__ */ |
| 174 | export function generateHash(str: string): string { |
| 175 | let hash = 0 |
| 176 | if (str.length === 0) { |
| 177 | return `${hash}` |
| 178 | } |
| 179 | for (let i = 0; i < str.length; i++) { |
| 180 | const char = str.charCodeAt(i) |
| 181 | hash = (hash << 5) - hash + char |
| 182 | hash = hash & hash // Convert to 32bit integer |
| 183 | } |
| 184 | return `${hash}` |
| 185 | } |
| 186 | |
| 187 | export function calculateSuiteHash(parent: Suite): void { |
| 188 | parent.tasks.forEach((t, idx) => { |
no outgoing calls
no test coverage detected