zoukankan      html  css  js  c++  java
  • [Unit test] jasmine createSpyObj

        beforeEach(() => {
          contextStub = {
            debug: false,
            engine: jasmine.createSpyObj('engine', [
              'createCollection', 'createContext', 'createSchematic',
              'createSourceFromUrl', 'transformOptions', 'executePostTasks'
            ]),
            logger: jasmine.createSpyObj('logger', ['info']),
            schematic: jasmine.createSpyObj('schematic', ['call']),
            strategy: 0,
            interactive: false,
            addTask: jasmine.createSpy()
          };
        });
    
        it('schedules an npm install task if Material is not installed', () => {
          const rule = installMaterial();
          rule(testTree, contextStub);
    
          expect(contextStub.addTask).toHaveBeenCalled();
          expect(contextStub.logger.info).toHaveBeenCalledWith('Installing Angular Material...');
        });
  • 相关阅读:
    npx
    EOS踩坑记 2
    Communication Model
    EOS踩坑记
    Windows导入EOS工程
    搭建EOS环境
    加入EOS主网
    Add Inline Actions
    Secondary Indices
    Data Persistence
  • 原文地址:https://www.cnblogs.com/Answer1215/p/12031590.html
Copyright © 2011-2022 走看看