Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: get docs running again #106

Merged
merged 1 commit into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 8 additions & 9 deletions .esdoc.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
{
"source": "./",
"destination": "./docs",
"includes": ["\\.js$"],
"includes": ["\\.(j|t)sx?$"],
"excludes": [
"node_modules",
".next",
"build",
"world_client.js",
"coverage",
"public",
"docs/script",
"setupTests.js",
"src/client/js/__tests__",
"wallaby.config.js",
"webpack.config.js",
"webpack.prod.config.js"
"__tests__",
"wallaby.config.js"
],
"plugins": [
{ "name": "esdoc-ecmascript-proposal-plugin", "option": { "all": true } },
{"name": "esdoc-ecmascript-proposal-plugin", "option": {"all": true}},
{
"name": "esdoc-standard-plugin",
"option": {
"test": {
"source": "./",
"interfaces": ["describe", "it", "context", "suite", "test"],
"includes": ["(spec|Spec|test|Test)\\.js$"],
"includes": ["(spec|Spec|test|Test)\\.(j|t)sx?$"],
"excludes": ["node_modules","build"]
},
"lint": { "enable": true },
Expand All @@ -35,7 +34,7 @@
"unexportedIdentifier": { "enable": false },
"typeInference": { "enable": true },
"brand": {
"logo": "./assets/img/wtflogo-small.png",
"logo": "./public/img/wtflogo-small.png",
"title": "WTF Adventure",
"description": "documentation for your wtf needs",
"repository": "https://github.com/design1online/WTF-Adventure",
Expand Down
2 changes: 1 addition & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '@/styles/globals.scss';
import type { Metadata } from 'next';
import { Inter } from 'next/font/google';
import config from '@/client/config.json' assert { type: 'json'};
import * as config from '@/client/config.json';
import Providers from '@/client/contexts/providers';

const inter = Inter({ subsets: ['latin'] });
Expand Down
2 changes: 1 addition & 1 deletion client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import _ from 'underscore';
import Module from './utils/modules';
import log from './lib/log';
import Detect from './utils/detect';
import config from './config.json';
import * as config from './config.json';

/**
* Controls the client side changes for the application and game
Expand Down
64 changes: 0 additions & 64 deletions client/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,68 +16,4 @@ describe('Client', () => {
it('.constructor()', () => {
expect(Client).toBeDefined();
});

// /**
// * @test {WTF#load}
// */
// it('.load()', () => {
// expect(instance.app).toEqual(null);
// instance.load();
// expect(instance.app).toBeDefined();
// expect(instance.body).toBeDefined();
// expect(instance.chatInput).toBeDefined();
// });

// /**
// * @test {WTF#documentReady}
// */
// it('.documentReady()', () => {
// expect(instance.app).toEqual(null);
// instance.documentReady();
// expect(instance.app).toBeDefined();
// expect(instance.body).toBeDefined();
// expect(instance.chatInput).toBeDefined();
// });

// /**
// * @test {WTF#addClasses}
// */
// it('.addClasses()', () => {
// instance.documentReady();
// instance.addClasses();
// expect(instance.chatInput).toBeDefined();
// expect(instance.body[0].className).toEqual('windows opera');
// });

// /**
// * @test {WTF#addResizeListeners}
// */
// it('.addResizeListeners()', () => {
// instance.documentReady();
// const map = {};
// document.addEventListener = jest.fn((event, callback) => {
// map[event] = callback;
// });

// instance.addResizeListeners();
// expect(map.touchstart).toBeDefined();
// expect(map.touchmove).toBeDefined();
// expect(map.touchmove(new Event('test'))).toEqual(false);

// // check window orientation changes
// const updateOrientationMock = jest.spyOn(instance.app, 'updateOrientation');
// window.dispatchEvent(new Event('orientationchange'));
// expect(updateOrientationMock).toHaveBeenCalled();
// });

// /**
// * @test {WTF#initGame}
// */
// it('.initGame()', () => {
// const wtf = new WTF();
// expect(wtf.app).toEqual(null);
// wtf.documentReady();
// wtf.initGame();
// expect(wtf.app.readyCallback).toBeDefined();
// });
});
Loading
Loading