1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-04 05:02:41 +03:00

Fix logger imports in tests

This commit is contained in:
Travis Ralston
2019-12-10 11:39:56 -07:00
parent 3dfde6bf6a
commit ca6a52727c
17 changed files with 17 additions and 17 deletions

View File

@@ -25,7 +25,7 @@ import sdk from '..';
import testUtils from './test-utils'; import testUtils from './test-utils';
import MockHttpBackend from 'matrix-mock-request'; import MockHttpBackend from 'matrix-mock-request';
import LocalStorageCryptoStore from '../lib/crypto/store/localStorage-crypto-store'; import LocalStorageCryptoStore from '../lib/crypto/store/localStorage-crypto-store';
import logger from '../src/logger'; import logger from '../lib/logger';
/** /**
* Wrapper for a MockStorageApi, MockHttpBackend and MatrixClient * Wrapper for a MockStorageApi, MockHttpBackend and MatrixClient

View File

@@ -17,7 +17,7 @@ limitations under the License.
import TestClient from '../TestClient'; import TestClient from '../TestClient';
import testUtils from '../test-utils'; import testUtils from '../test-utils';
import logger from '../../src/logger'; import logger from '../../lib/logger';
const ROOM_ID = "!room:id"; const ROOM_ID = "!room:id";

View File

@@ -34,7 +34,7 @@ const sdk = require("../..");
const utils = require("../../lib/utils"); const utils = require("../../lib/utils");
const testUtils = require("../test-utils"); const testUtils = require("../test-utils");
const TestClient = require('../TestClient').default; const TestClient = require('../TestClient').default;
import logger from '../../src/logger'; import logger from '../../lib/logger';
let aliTestClient; let aliTestClient;
const roomId = "!room:localhost"; const roomId = "!room:localhost";

View File

@@ -4,7 +4,7 @@ const sdk = require("../..");
const HttpBackend = require("matrix-mock-request"); const HttpBackend = require("matrix-mock-request");
const utils = require("../test-utils"); const utils = require("../test-utils");
const EventTimeline = sdk.EventTimeline; const EventTimeline = sdk.EventTimeline;
import logger from '../../src/logger'; import logger from '../../lib/logger';
const baseUrl = "http://localhost.or.something"; const baseUrl = "http://localhost.or.something";
const userId = "@alice:localhost"; const userId = "@alice:localhost";

View File

@@ -21,7 +21,7 @@ const anotherjson = require('another-json');
const utils = require('../../lib/utils'); const utils = require('../../lib/utils');
const testUtils = require('../test-utils'); const testUtils = require('../test-utils');
const TestClient = require('../TestClient').default; const TestClient = require('../TestClient').default;
import logger from '../../src/logger'; import logger from '../../lib/logger';
const ROOM_ID = "!room:id"; const ROOM_ID = "!room:id";

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import logger from '../src/logger'; import logger from '../lib/logger';
// try to load the olm library. // try to load the olm library.
try { try {

View File

@@ -2,7 +2,7 @@
// load olm before the sdk if possible // load olm before the sdk if possible
import './olm-loader'; import './olm-loader';
import logger from '../src/logger'; import logger from '../lib/logger';
import sdk from '..'; import sdk from '..';
const MatrixEvent = sdk.MatrixEvent; const MatrixEvent = sdk.MatrixEvent;

View File

@@ -18,7 +18,7 @@ limitations under the License.
import DeviceList from '../../../lib/crypto/DeviceList'; import DeviceList from '../../../lib/crypto/DeviceList';
import MemoryCryptoStore from '../../../lib/crypto/store/memory-crypto-store.js'; import MemoryCryptoStore from '../../../lib/crypto/store/memory-crypto-store.js';
import utils from '../../../lib/utils'; import utils from '../../../lib/utils';
import logger from '../../../src/logger'; import logger from '../../../lib/logger';
const signedDeviceList = { const signedDeviceList = {
"failures": {}, "failures": {},

View File

@@ -7,7 +7,7 @@ import MockStorageApi from '../../../MockStorageApi';
import testUtils from '../../../test-utils'; import testUtils from '../../../test-utils';
import OlmDevice from '../../../../lib/crypto/OlmDevice'; import OlmDevice from '../../../../lib/crypto/OlmDevice';
import Crypto from '../../../../lib/crypto'; import Crypto from '../../../../lib/crypto';
import logger from '../../../../src/logger'; import logger from '../../../../lib/logger';
const MatrixEvent = sdk.MatrixEvent; const MatrixEvent = sdk.MatrixEvent;
const MegolmDecryption = algorithms.DECRYPTION_CLASSES['m.megolm.v1.aes-sha2']; const MegolmDecryption = algorithms.DECRYPTION_CLASSES['m.megolm.v1.aes-sha2'];

View File

@@ -18,7 +18,7 @@ import '../../../olm-loader';
import MemoryCryptoStore from '../../../../lib/crypto/store/memory-crypto-store.js'; import MemoryCryptoStore from '../../../../lib/crypto/store/memory-crypto-store.js';
import MockStorageApi from '../../../MockStorageApi'; import MockStorageApi from '../../../MockStorageApi';
import logger from '../../../../src/logger'; import logger from '../../../../lib/logger';
import OlmDevice from '../../../../lib/crypto/OlmDevice'; import OlmDevice from '../../../../lib/crypto/OlmDevice';
import olmlib from '../../../../lib/crypto/olmlib'; import olmlib from '../../../../lib/crypto/olmlib';

View File

@@ -25,7 +25,7 @@ import testUtils from '../../test-utils';
import OlmDevice from '../../../lib/crypto/OlmDevice'; import OlmDevice from '../../../lib/crypto/OlmDevice';
import Crypto from '../../../lib/crypto'; import Crypto from '../../../lib/crypto';
import logger from '../../../src/logger'; import logger from '../../../lib/logger';
import olmlib from '../../../lib/crypto/olmlib'; import olmlib from '../../../lib/crypto/olmlib';
const Olm = global.Olm; const Olm = global.Olm;

View File

@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import logger from '../../../../src/logger'; import logger from '../../../../lib/logger';
try { try {
global.Olm = require('olm'); global.Olm = require('olm');

View File

@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import logger from '../../../../src/logger'; import logger from '../../../../lib/logger';
try { try {
global.Olm = require('olm'); global.Olm = require('olm');

View File

@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import logger from '../../../../src/logger'; import logger from '../../../../lib/logger';
try { try {
global.Olm = require('olm'); global.Olm = require('olm');

View File

@@ -17,7 +17,7 @@ limitations under the License.
import sdk from '../..'; import sdk from '../..';
const MatrixEvent = sdk.MatrixEvent; const MatrixEvent = sdk.MatrixEvent;
import logger from '../../src/logger'; import logger from '../../lib/logger';
describe("MatrixEvent", () => { describe("MatrixEvent", () => {
describe(".attemptDecryption", () => { describe(".attemptDecryption", () => {

View File

@@ -21,7 +21,7 @@ const sdk = require("../..");
const InteractiveAuth = sdk.InteractiveAuth; const InteractiveAuth = sdk.InteractiveAuth;
const MatrixError = sdk.MatrixError; const MatrixError = sdk.MatrixError;
import logger from '../../src/logger'; import logger from '../../lib/logger';
// Trivial client object to test interactive auth // Trivial client object to test interactive auth
// (we do not need TestClient here) // (we do not need TestClient here)

View File

@@ -3,7 +3,7 @@ import 'source-map-support/register';
const sdk = require("../.."); const sdk = require("../..");
const MatrixClient = sdk.MatrixClient; const MatrixClient = sdk.MatrixClient;
import logger from '../../src/logger'; import logger from '../../lib/logger';
jest.useFakeTimers(); jest.useFakeTimers();