We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 648649e commit 4e88ba3Copy full SHA for 4e88ba3
lib/utils/test/utils.test.js
@@ -1,6 +1,20 @@
1
/* global expect */
2
-import { testUtil } from '../utils';
+import { getActualSource } from '../utils';
3
4
-test('[Utils]: Should be defined', () => {
5
- expect(testUtil).toBeDefined();
+describe('[Utils]', () => {
+ describe('[getActualSource]', () => {
6
+ it('should be defined', () => {
7
+ expect(getActualSource).toBeInstanceOf(Function);
8
+ });
9
+ it('using assets path, should return string', () => {
10
+ const PATH_TO_SORUCE = 'pathToSource';
11
+ const returnValue = getActualSource(PATH_TO_SORUCE);
12
+
13
+ expect(returnValue).toBe(PATH_TO_SORUCE);
14
15
+ it('using require(), should return string', () => {
16
+ const returnValue = getActualSource(require('../../../test.jpeg'));
17
+ expect(returnValue).toMatch(/http:\/\//);
18
19
20
});
test.jpeg
1.11 KB
0 commit comments