Skip to content

Instantly share code, notes, and snippets.

View SibeeshVenu's full-sized avatar
🙂
Learning and Sharing

Sibeesh Venu SibeeshVenu

🙂
Learning and Sharing
View GitHub Profile
import * as React from 'react';
import * as ReactDom from 'react-dom';
import { Version } from '@microsoft/sp-core-library';
import {
BaseClientSideWebPart,
IPropertyPaneConfiguration,
PropertyPaneTextField
} from '@microsoft/sp-webpart-base';
import * as strings from 'MenuWebPartStrings';
@SibeeshVenu
SibeeshVenu / Menu.tsx
Created October 19, 2018 07:38
Custom menu tsx file
import * as React from 'react';
import { IMenuProps } from './IMenuProps';
import { CommandBar } from 'office-ui-fabric-react/lib/CommandBar';
export default class Menu extends React.Component<IMenuProps, {}> {
constructor(props: IMenuProps) {
super(props);
}
public render(): React.ReactElement<IMenuProps> {
const { items } = this.props;
import { IContextualMenuItem } from "office-ui-fabric-react/lib/ContextualMenu";
export interface IMenuProps {
items: IContextualMenuItem[];
}
npm install mocha
code test/test.js
var assert = require('assert');
describe('Array', function() {
describe('#indexOf()', function() {
it('should return -1 when the value is not present', function() {
assert.equal([1,2,3].indexOf(4), -1);
});
});
});
mocha : The term 'mocha' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path
was included, verify that the path is correct and try again.
At line:1 char:1
+ mocha
+ ~~~~~
 + CategoryInfo : ObjectNotFound: (mocha:String) [], CommandNotFoundException
 + FullyQualifiedErrorId : CommandNotFoundException
npm@6.1.0 C:\Program Files (x86)\nodejs\node_modules\npm
PS F:\SibeeshPassion\Articles\NPMvsNPX\npm\mocha-example-npm> npm i mocha -g
C:\Users\Sibeesh\AppData\Roaming\npm\mocha -> C:\Users\Sibeesh\AppData\Roaming\npm\node_modules\mocha\bin\mocha
C:\Users\Sibeesh\AppData\Roaming\npm\_mocha -> C:\Users\Sibeesh\AppData\Roaming\npm\node_modules\mocha\bin\_mocha
+ mocha@5.2.0
added 24 packages from 436 contributors in 3.458s
PS F:\SibeeshPassion\Articles\NPMvsNPX\npm\mocha-example-npm> npm list -g mocha
C:\Users\Sibeesh\AppData\Roaming\npm
`-- mocha@5.2.0
PS F:\SibeeshPassion\Articles\NPMvsNPX\npm\mocha-example-npm> mocha
./node_modules/mocha/bin/mocha