mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-01 00:08:27 +01:00
23094b016e
## What We've already added the backend for this. This is the initial work for drawing a chart for instance traffic in the frontend. It requires the environment variable `PROMETHEUS_API` set to a valid prometheus-query-language (promql) supported backend, such as Prometheus itself or Victoria Metrics. Besides, at the moment we're hiding this functionality behind the flag `UNLEASH_EXPERIMENTAL_NETWORK_VIEW` which has to be set to true Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai> Co-authored-by: Gastón Fournier <gaston@getunleash.ai>
15 lines
517 B
TypeScript
15 lines
517 B
TypeScript
import { CyclicIterator } from './cyclicIterator';
|
|
|
|
test('loops around the list', () => {
|
|
const iterator = new CyclicIterator<number>([1, 3, 5, 7]);
|
|
expect(iterator.next()).toEqual(1);
|
|
expect(iterator.next()).toEqual(3);
|
|
expect(iterator.next()).toEqual(5);
|
|
expect(iterator.next()).toEqual(7);
|
|
expect(iterator.next()).toEqual(1);
|
|
expect(iterator.next()).toEqual(3);
|
|
expect(iterator.next()).toEqual(5);
|
|
expect(iterator.next()).toEqual(7);
|
|
expect(iterator.next()).toEqual(1);
|
|
});
|