-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.js
59 lines (47 loc) · 2.08 KB
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import test from 'ava';
import detectJsFramework from './index.js';
test.serial('should detect js framework as remix', async t => {
const frameworkArray = await detectJsFramework('https://remix.run/');
t.deepEqual(frameworkArray[0].name, 'remix');
});
test.serial('should detect js framework as Angular', async t => {
const frameworkArray = await detectJsFramework('https://angular.io/');
t.is(frameworkArray[0].name, 'angular');
});
test.serial('should detect js framework as React', async t => {
const frameworkArray = await detectJsFramework('https://reactjs.org/');
t.is(frameworkArray[0].name, 'react');
});
test.serial('should detect js framework as JQuery', async t => {
const frameworkArray = await detectJsFramework('http://jquery.com');
t.is(frameworkArray[0].name, 'jquery');
});
test.serial('should detect js framework as Next.js', async t => {
const frameworkArray = await detectJsFramework('https://nextjs.org/');
t.is(frameworkArray[0].name, 'next');
});
test.serial('should detect js framework as Ember.js', async t => {
const frameworkArray = await detectJsFramework('https://emberjs.com/');
t.is(frameworkArray[0].name, 'emberjs');
});
test.serial('should detect js framework as Vue', async t => {
const frameworkArray = await detectJsFramework('https://vuejs.org/');
t.is(frameworkArray[0].name, 'vue');
});
test.serial('should detect js framework as Gatsby', async t => {
const frameworkArray = await detectJsFramework('https://www.gatsbyjs.org/');
t.is(frameworkArray[0].name, 'react');
});
test.serial('should detect js framework as Nuxt.js', async t => {
const frameworkArray = await detectJsFramework('https://nuxtjs.org/');
t.is(frameworkArray[0].name, 'vue');
});
test.serial('should detect js framework as WordPress', async t => {
const frameworkArray = await detectJsFramework('https://wordpress.org/');
t.is(frameworkArray[0].name, 'vue');
});
// Random website tests
test.serial('should detect js framework as jquery for azure devops', async t => {
const frameworkArray = await detectJsFramework('https://wiredelta.com/');
t.is(frameworkArray[0].name, 'vue');
});